[fpc-pascal] Re: pchar with more than 255 characters

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Nov 14 22:00:28 CET 2011


On 13 Nov 2011, at 14:02, Rainer Stratmann wrote:

> Am Sunday 13 November 2011 02:15:07 schrieb leledumbo:
>> It works when {$LONGSTRINGS ON} or {$H+} directive exists. I think the
>> compiler treats functions receiving array of char (or pointer to it) as
>> ShortString when none of the directives above exist.
> 
> No it does not work then.
> I put already the -Sh- additional compiler arg.

-Sh- Is the same as {$h-} or {$longstrings off}. You need -Sh (provided that there's no {$mode fpc/objfpc/tp/macpas} in the source file, since that will disable them again).


Jonas


More information about the fpc-pascal mailing list