On 21.02.2011 09:02, Florian Klaempfl wrote:
Am 21.02.2011 08:09, schrieb Graeme Geldenhuys:

Introducing yet another compiler mode also doesn't seem like the way to
go. FPC is already complex enough. The String type simply needs to
evolve to Unicode support, just like it did from ShortString to
LongString. A natural evolution.

Remember your crying about the different handling of temp. interfaces in
FPC which is only a implementation detail?

This should probably be something
included in both ObjFPC and Delphi compiler modes, but again, I only
every work with ObjFPC mode.

When did String change from ShortString to LongString (actually
AnsiString) in ObjFPC? ObjFPC used AnsiString for a String from the
beginning ...

Sorry Florian, but I need to correct you here:

=== source begin ===

program stringtest;

{$mode objfpc}

procedure TestShort(var aStr: ShortString);
begin

end;

procedure TestAnsi(var aStr: AnsiString);
begin

end;

var
  s: String;
begin
  s := 'Hello World';
  TestAnsi(s);
end.

=== source end ===

=== console begin ===

[sven@artemis oneshots]$ fpc stringtest.pas
Free Pascal Compiler version 2.4.2 [2010/11/08] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for i386
Compiling stringtest.pas
stringtest.pas(19,13) Error: Call by var for arg no. 1 has to match exactly: Got "ShortString" expected "AnsiString"
stringtest.pas(21) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /mnt/data/applications/fpc/2.4.2/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)

===console end===

(same with 2.5.1 from end of January this year)

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to