mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-07 08:16:15 +01: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 -
19 lines
204 B
ObjectPascal
19 lines
204 B
ObjectPascal
{ %fail }
|
|
{$mode macpas}
|
|
|
|
type
|
|
tchararr = array[1..4] of char;
|
|
|
|
var
|
|
l: longint;
|
|
|
|
begin
|
|
l[1] := 'a';
|
|
l[2] := 'b';
|
|
l[3] := 'c';
|
|
l[4] := 'd';
|
|
if tchararr(l) <> 'abcd' then
|
|
halt(1);
|
|
end.
|
|
|