fpc/tests/test/tint2str1.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

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.