mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 01:09:35 +02:00

macpas after discussion on macpascal mailing list. The only thing left is automatic conversion of constant strings of length 4 to 32 bit ints. * adapted tests to this * fixed FOUR_CHAR_CODE and FCC functions in MacPas unit for little endian + FourCharArray type in macpas unit wich can be used to typecast int's "back" to an array[1..4] of char (though the characters will be in reverse on little endian systems in that case) git-svn-id: trunk@5154 -
16 lines
251 B
ObjectPascal
16 lines
251 B
ObjectPascal
{$mode macpas}
|
|
|
|
procedure test2(c1,c2,c3,c4: char);
|
|
begin
|
|
if (c1 <> 'a') or (c2 <> 'b') or (c3 <> 'c') or (c4 <> 'd') then
|
|
halt(2);
|
|
end;
|
|
|
|
|
|
var
|
|
l: longint;
|
|
begin
|
|
l := 'abcd';
|
|
test2(char(l shr 24),char(l shr 16),char(l shr 8),char(l));
|
|
end.
|