tb0281.pp 468 B

1234567891011121314151617181920212223242526272829
  1. { Old file: tbs0333.pp }
  2. { }
  3. {$ifdef cpu68k}
  4. {$define COMP_IS_INT64}
  5. {$endif cpu68k}
  6. var
  7. a,b : comp;
  8. s1,s2 : string;
  9. begin
  10. a:=11384563;
  11. b:=a*a;
  12. {$ifdef COMP_IS_INT64}
  13. str(a*a,s1);
  14. str(b,s2);
  15. {$else not COMP_IS_INT64}
  16. str(a*a:0:0,s1);
  17. str(b:0:0,s2);
  18. {$endif COMP_IS_INT64}
  19. writeln(s1);
  20. writeln(s2);
  21. if (s1<>'129608274700969') or (s2<>'129608274700969') then
  22. begin
  23. writeln('Error with comp type rounding');
  24. halt(1);
  25. end;
  26. end.