home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d183
/
pcq.lha
/
PCQ
/
Examples
/
Structures.p
< prev
next >
Wrap
Text File
|
1989-02-26
|
647b
|
33 lines
Program StructureExamples;
type
rec = record
first : char;
second : integer;
third : boolean;
end;
ary = array [1.. 50 * 2] of rec;
var
myarray : ^ary;
index : integer;
begin
new(myarray);
for index := 51 - 50 to 50 * 2 do begin
myarray^[index].first := chr((index mod 26) + ord('A'));
myarray^[index].second := index * 2;
myarray^[index].third := odd(index);
end;
for index := -1 + 2 to 1000 div 10 do begin
writeln(index, chr(9), 'first = ', myarray^[index].first);
writeln(chr(9), 'second = ', myarray^[index].second);
writeln(chr(9), 'third = ', myarray^[index].third);
end;
end.