1
{ based on gpc test pvs1 }
2
{ FLAG --extended-pascal }
4
{TEST 6.6.5.4-1, CLASS=CONFORMANCE}
6
{ This program tests that pack and unpack are
7
implemented in this compiler as according to the
9
The compiler fails if the program does not compile. }
11
program t6p6p5p4d1(output);
16
colourtype = (red,pink,orange,yellow,green,blue);
18
unone : array[3..24] of char;
19
pacone : packed array[1..4] of char;
20
pacy : array[1..4] of char;
21
untwo : array[4..8] of colourtype;
22
pactwo : packed array[6..7] of colourtype;
29
if pacy <> 'ABCD' then
32
unpack(pacone,unone,5);
33
if (unone[3] <> #0) or
41
(unone[11] <> #0) then
50
if (pactwo[6] <> pink) or
51
(pactwo[7] <> orange) then
53
writeln('unone[5] = ''', unone[5], ''' = ', ord(unone[5]));
55
writeln(' PASS...6.6.5.4-1')
58
writeln(' FAIL...6.6.5.4-1');