123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- program tcpstr22;
- {$MODE DELPHI}
- type
- cp1253string = type AnsiString(1253);
- // --- all string types ---
- procedure test_overload1(const s: AnsiString); overload;
- begin
- end;
- procedure test_overload1(const s: UTF8String); overload;
- begin
- halt(1);
- end;
- procedure test_overload1(const s: cp1253string); overload;
- begin
- halt(1);
- end;
- procedure test_overload1(const s: unicodestring); overload;
- begin
- halt(1);
- end;
- procedure test_overload1(const s: widestring); overload;
- begin
- halt(1);
- end;
- procedure test_overload1(const s: ShortString); overload;
- begin
- halt(1);
- end;
- // --- no AnsiString ---
- procedure test_overload2(const s: UTF8String); overload;
- begin
- end;
- procedure test_overload2(const s: cp1253string); overload;
- begin
- halt(2);
- end;
- procedure test_overload2(const s: unicodestring); overload;
- begin
- halt(2);
- end;
- procedure test_overload2(const s: widestring); overload;
- begin
- halt(2);
- end;
- procedure test_overload2(const s: ShortString); overload;
- begin
- halt(2);
- end;
- // --- no AnsiString, UTF8String ---
- procedure test_overload3(const s: cp1253string); overload;
- begin
- end;
- procedure test_overload3(const s: unicodestring); overload;
- begin
- halt(3);
- end;
- procedure test_overload3(const s: widestring); overload;
- begin
- halt(3);
- end;
- procedure test_overload3(const s: ShortString); overload;
- begin
- halt(3);
- end;
- // --- no AnsiString, UTF8String, AnsiString(codepage) ---
- procedure test_overload4(const s: unicodestring); overload;
- begin
- end;
- {ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
- procedure test_overload4(const s: widestring); overload;
- begin
- halt(4);
- end;
- {$endif}
- procedure test_overload4(const s: ShortString); overload;
- begin
- halt(4);
- end;
- // --- no AnsiString, UTF8String, AnsiString(codepage), UnicodeString ---
- procedure test_overload5(const s: widestring); overload;
- begin
- end;
- procedure test_overload5(const s: ShortString); overload;
- begin
- halt(5);
- end;
- var
- A: AnsiString;
- begin
- test_overload1(A);
- test_overload2(A);
- test_overload3(A);
- test_overload4(A);
- test_overload5(A);
- end.
|