Am 13.11.2011 17:49, schrieb Graeme Geldenhuys:
On 13/11/2011, leledumbo<leledumbo_cool@....>  wrote:
I think the
compiler treats functions receiving array of char (or pointer to it) as
ShortString when none of the directives above exist.

Indeed, FPC defaults to ShortString if {$H+} is not specified. That is
probably the problem. I really don't know why this is still so (maybe
some performance thing inside the compiler itself). I now simply
specify $H+ in the fpc.cfg file, in case I forget to add it to the
header of a unit.

That the compiler uses ShortString for performance reasons is not related to the fact that ObjFPC uses them by default. In this case the reason is simply backwards compatibilty (note: not Delphi compatibilty :P ). Though its not the compiler which is the problem here as it has an explicit "{$H-}" in its define include file.

Regards,
Sven

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

Reply via email to