On 18.08.2012 17:48, Ludo Brands wrote:
Only in {$mode delphiunicode} (which is what you should use if you
want to compile code written for a Delphi version in which
string=unicodestring).


Is this hidden gem announced or documented somewhere? Is there a -M<x>
compiler switch to set it as default language mode? FPC doesn't list it yet.

I don't know whether Michael documented it already, but it's not announced, because there's no guarantee yet, that it will work as advertised.

E.g. consider the following example:

{$mode delphiunicode}

type
  TMyStringList = class(TStringList)
    function Add(const aText: String): Integer; override;
  end;

This will currently give a compile error, because TStringList is compiled with "String = AnsiString" and thus the override is incorrect.

AFAIK there isn't any switch for that mode yet. You might want to create a bug report...

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to