On 16/11/2011 15:55, Rainer Stratmann wrote:
-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).
With {$h+} it works.

But when having pchar I wonder why it generally is not possible to make
strings longer than 255 as it was possible in the previous compiler version.


Maybe not an answer to your question, but why do you use length?

As mentioned before by someone else: length does read a field from the string, which does not exist in pchar (hence string can contain #0 and pchar can not).

So why not use  pos(#0, foo_pchar) ?

Of course this does not answer the question IF or WHY this has changed

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

Reply via email to