Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
type SampleType = (A, B, C, D);
var dummy: array[0..5, 0..9] of SampleType = (
(D, D, D, D, D, D, D, D, D, D),
(D, D, D, D, D, D, D, D, D, D),
(D, D, D, D, D, D, D, D, D, D),
(D, D, D, D, D, D, D, D, D, D),
(D, D, D, D, D, D, D, D, D, D),
(D, D, D, D, D, D, D, D, D, D)
);
begin
end.
tebe:
nie spróbujesz to się nie dowieszqr: array[0..34] of string = (
'11111111111111111111111111111111111',
'10000000100010100111111100100000001',
'10111110100011010000011111101111101',
'10100010101001000100111001101000101',
'10100010100101000110110101101000101',
'10100010111111001110110100101000101',
'10111110101100100100001001101111101',
'10000000101010101010101010100000001',
'11111111110110011000111100111111111',
'10011000111101001101010100110100001',
'10011001010010110010011111011001101',
'10100010101100111001110011111010011',
'10101111011001010100111101011111001',
'11101000001010000001001010111100111',
'10100011100111111000101100000001101',
'10110000101011000000111001110010011',
'10011001001010111001111010100001001',
'10110110001100100100000111011011111',
'10110111010110001110101010111101101',
'10111100001001110101110011111010011',
'10010001011110110101100011110001111',
'11100010100101011101000100001011111',
'10010101010010110010110111011011101',
'11101100100111100011100011111011011',
'11110111101001011001110101111101111',
'10001010110001111101000110000010011',
'11111111100110001001111110111011011',
'10000000110111010101100010101000111',
'10111110101111010100100000111001001',
'10100010100010001100100110000011101',
'10100010110101010010011110111111001',
'10100010111010100001110010111101011',
'10111110100100000101110011000001111',
'10000000101000101011000111101111101',
'11111111111111111111111111111111111'
);
begin
InitGraph(8);
TextBackground(0);
SetColor(1);
for y := 0 to 34 do begin
binLine := qr[y];
newYLine := y * 4;
for x := 1 to 35 do begin
boxStart := x * 4;
boxEnd := boxStart + 3;
if (binLine[x] = '1') then begin
drawBox(boxStart, boxEnd, newYLine);
end;
end;
ReadKey;
end
uses crt, fastgraph;
var x, y: byte;
binLine: string;
qr: array[0..34] of string = (
'11111111111111111111111111111111111',
'10000000100010100111111100100000001',
'10111110100011010000011111101111101',
'10100010101001000100111001101000101',
'10100010100101000110110101101000101',
'10100010111111001110110100101000101',
'10111110101100100100001001101111101',
'10000000101010101010101010100000001',
'11111111110110011000111100111111111',
'10011000111101001101010100110100001',
'10011001010010110010011111011001101',
'10100010101100111001110011111010011',
'10101111011001010100111101011111001',
'11101000001010000001001010111100111',
'10100011100111111000101100000001101',
'10110000101011000000111001110010011',
'10011001001010111001111010100001001',
'10110110001100100100000111011011111',
'10110111010110001110101010111101101',
'10111100001001110101110011111010011',
'10010001011110110101100011110001111',
'11100010100101011101000100001011111',
'10010101010010110010110111011011101',
'11101100100111100011100011111011011',
'11110111101001011001110101111101111',
'10001010110001111101000110000010011',
'11111111100110001001111110111011011',
'10000000110111010101100010101000111',
'10111110101111010100100000111001001',
'10100010100010001100100110000011101',
'10100010110101010010011110111111001',
'10100010111010100001110010111101011',
'10111110100100000101110011000001111',
'10000000101000101011000111101111101',
'11111111111111111111111111111111111'
);
begin
InitGraph(5);
TextBackground(0);
SetColor(1);
for y := 0 to 34 do begin
binLine := qr[y];
for x := 1 to 35 do begin
if (binLine[x] = '1') then begin
PutPixel(x,y);
end;
end;
end;
ReadKey;
end.
hello_qr_v2.pas (52,13) Error: -- under construction --
begin
InitGraph(5);
TextBackground(0);
SetColor(1);
for y := 0 to 34 do begin
for x := 0 to 34 do begin
if (qr[y][x] = 1) then begin
PutPixel(x,y);
end;
end;
end;
ReadKey;
end.
mp hello_qr_v3.pas
Mad Pascal Compiler version 1.6.2 [2019/11/05] for 6502
Compiling hello_qr_v3.pas
An unhandled exception occurred at $00000000004769A2:
EAccessViolation: Access violation
$00000000004769A2
$00000000004A6533
tab: array [0..255] of byte;
tab2: array [0..127] of word;
tab3: array [0..63] od cardinal;
tab4: array [0..15, 0..15] of byte;
tab5: array [0..7, 0..15] of byte;
tab6: array [0..10, 0..10] of word;
tab7: array [0..7, 0..7] of cardinal;
tab: array [0..0] of byte;
tab2: array [0..255] of cardinal;
itp.
Mad Pascal Compiler version 1.6.2 [2019/11/05] for 6502
mads 2.1.0
uses crt, fastgraph;
var qr: array [0..255] of byte;
begin
InitGraph(5);
TextBackground(0);
SetColor(1);
ReadKey;
end.
mp hello_qr_v4.pas
Mad Pascal Compiler version 1.6.2 [2019/11/05] for 6502
Compiling hello_qr_v4.pas
An unhandled exception occurred at $00000000004769A2:
EAccessViolation: Access violation
$00000000004769A2
$00000000004A6533
Zbyti:
To tak na początek ode mnie, w formie żartu, mój pierwszy program w Mad Pascalu ;)1111111111111111111111111111111111110000000100010100111111100100000001101111101000110100000111111011111011010001010100100010011100110100010110100010100101000110110101101000101101000101111110011101101001010001011011111010110010010000100110111110110000000101010101010101010100000001111111111101100110001111001111111111001100011110100110101010011010000110011001010010110010011111011001101101000101011001110011100111110100111010111101100101010011110101111100111101000001010000001001010111100111101000111001111110001011000000011011011000010101100000011100111001001110011001001010111001111010100001001101101100011001001000001110110111111011011101011000111010101011110110110111100001001110101110011111010011100100010111101101011000111100011111110001010010101110100010000101111110010101010010110010110111011011101111011001001111000111000111110110111111011110100101100111010111110111110001010110001111101000110000010011111111111001100010011111101110110111000000011011101010110001010100011110111110101111010100100000111001001101000101000100011001001100000111011010001011010101001001111011111100110100010111010100001110010111101011101111101001000001011100110000011111000000010100010101100011110111110111111111111111111111111111111111111
./compressor
string length: 1225
^#1Di!f#kBoEoAb0BOD1KDh1H1D1jD1GEhMoD1jDbIOGDkBMF1CHBh#1L1L1L1#!l1NqE1i!qUE1jHWH1CUGG1FBhH1jD1hIInBoIMqhGoI1gBIjAja1GQIjEibDq#qO1CMalIFqUF1M1IWCHqhEF1AqXbOqME1L1QO1QCIMiBoIfDl1hMEc!D1Gh1J1C0bGg1G1GYOqQhFl1Ei0Bh0bQoG1IgB0BD1N0BoEAi!lUD0bh1Oq#1YLqDjEkBM1jKAlF1jD1Df1FqAlODqL1FqkbH1DqWCqGlMpBKA1PhAB#jD1hEkB0^
compressed length: 306; compression: 75%
H4sIAAAAAAAA/4WTURICMQhDr0TufzkdS5LX9WPrWCvQNASQ3tecpd/3u8ccj47thGjtG+U992WoOSDxCE8ESpenh2UQaIYsl6Wo8Wvl4oz+PwPuDZfWSBfNTqSnw39JaMCHqNSlijRqU5zeaQ2sQylYPmfsiw1ACpYLNdy/ggOMWjCAlwpltjItQErVfkiRfESeMvO5NHjogm6YC80/SbN8t/euLmpfyjtJVntgT7ggKREGFSITXl2RkuWztThFpsOZA2Bm5poAJbMWkzPnuY6dperMGaPo9+S2ASxgKtaCTVTnS9c0PhSiei/rA9Md6k/JBAAA
eJyFk1ESAjEIQ69E7n85HUuS1/Vj61gr0DQEkN7XnKXf97vHHI+O7YRo7RvlPfdlqDkg8QhPBEqXp4dlEGiGLJelqPFr5eKM/j8D7g2X1kgXzU6kp8N/SWjAh6jUpYo0alOc3mkNrEMpWD5n7IsNQAqWCzXcv4IDjFowgJcKZbYyLUBK1X5IkXxEnjLzuTR46IJumAvNP0mzfLf3ri5qX8o7SVZ7YE+4ICkRBhUiE15dkZLls7U4RabDmQNgZuaaACWzFpMz57mOnaXqzBmj6PfktgEsYCrWgk1U50vXND4Uonov6wOCZehi