ivarol136.pp 834 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. comp136 = double;
  11. {$else FPC_COMP_IS_INT64}
  12. comp136 = comp;
  13. {$endif FPC_COMP_IS_INT64}
  14. procedure test136(a: shortstring); overload;
  15. begin
  16. writeln('shortstring called instead of ansistring');
  17. halt(1)
  18. end;
  19. procedure test136(a: ansistring); overload;
  20. begin
  21. writeln('ansistring called instead of shortstring');
  22. end;
  23. var
  24. x136: shortstring;
  25. y136: ansistring;
  26. procedure dotest136;
  27. var
  28. v: variant;
  29. begin
  30. try
  31. v := x136;
  32. test136(v);
  33. except
  34. on E : TObject do
  35. halt(1);
  36. end;
  37. try
  38. v := y136;
  39. test136(v);
  40. except
  41. on E : TObject do
  42. halt(1);
  43. end;
  44. end;
  45. {$ifndef bigfile} begin
  46. dotest136;
  47. end. {$endif not bigfile}