tb0250.pp 562 B

1234567891011121314151617181920212223242526
  1. { Old file: tbs0290.pp }
  2. { problem with storing hex numbers in integers }
  3. { $R+ would give compile time errors }
  4. {$R-}
  5. var i,j : integer;
  6. begin
  7. { the following line gives a warning and $ffff is changed to $7fff!}
  8. i := $ffff;
  9. if i <> $ffff then
  10. begin
  11. Writeln('i:=$ffff loads ',i,'$7fff if i is integer !');
  12. end;
  13. j := 65535;
  14. if j <> 65535 then
  15. begin
  16. Writeln('j:=65535 loads ',j,' if j is integer !');
  17. end;
  18. if ($ffff=65535) and (i<>j) then
  19. begin
  20. Writeln('i and j are different !!!');
  21. Halt(1);
  22. end;
  23. end.