tcint64.pp 636 B

123456789101112131415161718192021222324
  1. { The results of the following constants
  2. differ on 1.0 and 1.1 compiler
  3. as constants are evaluated as 32bit integers in 1.1
  4. and as 64bit integers in 1.1
  5. But in all cases int64(-1) should give -1 and not $ffffffff PM }
  6. {$R-}
  7. const
  8. u1 : qword = $ffffffff;
  9. i1 : int64 = $ffffffff;
  10. u2 : qword = -1;
  11. i2 : int64 = -1;
  12. begin
  13. Writeln(' qword($ffffffff) = ',u1);
  14. Writeln(' int64($ffffffff) = ',i1);
  15. Writeln(' qword(-1) = ',u2);
  16. Writeln(' int64(-1) = ',i2);
  17. if i2<>-1 then
  18. begin
  19. Writeln('"const i2 : int64 = -1;" code');
  20. Writeln('generates a wrong int64 constant');
  21. RunError(1);
  22. end;
  23. end.