ivarol39.pp 774 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {$ifndef bigfile}
  2. {$ifdef fpc}
  3. {$mode delphi}
  4. {$else fpc}
  5. {$define FPC_HAS_TYPE_EXTENDED}
  6. {$endif fpc}
  7. {$endif bigfile}
  8. type
  9. {$ifdef FPC_COMP_IS_INT64}
  10. comp39 = double;
  11. {$else FPC_COMP_IS_INT64}
  12. comp39 = comp;
  13. {$endif FPC_COMP_IS_INT64}
  14. procedure test39(a: int64); overload;
  15. begin
  16. writeln('int64 called instead of word');
  17. halt(1)
  18. end;
  19. procedure test39(a: word); overload;
  20. begin
  21. writeln('word called instead of int64');
  22. end;
  23. var
  24. x39: int64;
  25. y39: word;
  26. procedure dotest39;
  27. var
  28. v: variant;
  29. begin
  30. try
  31. v := x39;
  32. test39(v);
  33. except
  34. on E : TObject do
  35. halt(1);
  36. end;
  37. try
  38. v := y39;
  39. test39(v);
  40. except
  41. on E : TObject do
  42. halt(1);
  43. end;
  44. end;
  45. {$ifndef bigfile} begin
  46. dotest39;
  47. end. {$endif not bigfile}