Jonas Maebe <jonas.ma...@elis.ugent.be> hat am 22. November 2012 um 10:03 geschrieben: > > On 22 Nov 2012, at 02:00, Kenneth Cochran wrote: > > > On Wed, Nov 21, 2012 at 5:34 PM, Graeme Geldenhuys > > <gra...@geldenhuys.co.uk>wrote: > > > >> That is an incorrect assumptions. The compiler will happily accept > >> both > >> types without needing typecasting. > > > > I stand corrected. I assumed it behaved the same as Delphi in this > > respect. > > It doesn't, not even when Delphi mode is enabled. > > Delphi behaves like FPC, at least Kylix 3 does. Afaik the only use for > "type newstring = type string;" is so that you can declare overloaded > routines that are differentiated based on those two types.
Yes, for example you can ask the type via RTTI. For instance the LCL uses type TTranslateString = string for all string properties that should be auto translated. Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal