fpc/tests/test/t4cc1.pp
Jonas Maebe d87f03eef5 - removed automatic int-string, string-int and int-array conversion for
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 -
2006-11-01 16:34:37 +00:00

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.