On Fri, Dec 12, 2008 at 04:44:46PM +0100, Hans-Peter Diettrich wrote: > > be compiled with -Sh, others do not make that assumption and include {$H+} > > in the source. > > I'd go the Delphi way, and make "string" dependent on global settings > only. If somebody wants specific Ansi- or ShortStrings, s/he should use > the according types, in favor of the generic "string" type. Such strict > typing will make even legacy code better reusable. I dunno about the > perfomance of ShortString with FPC, but I don't think that there exist > many cases, where ShortString really provides any advantage over AnsiString.
string=Shortstring is about TP compatibility. string=ansistring for Delphi 2..D2007 compatibility. string=tunicodestring for D2009 compatibility (if a future FPC does that). IOW it is about backwards compatibility, not current usages scenario's. But I agree it could make an educational version easier. _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus