[fpc-pascal] Re: pchar with more than 255 characters
Sven Barth
pascaldragon at googlemail.com
Wed Nov 16 17:15:52 CET 2011
Am 16.11.2011 16:55, schrieb Rainer Stratmann:
> 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.
There was never a change regarding this as far as I know.
>
> For shortsting I accept strings not longer than 255 chars.
>
> Why is it not possible to make a var like
> svar : shortstring[ 20 ] ?
Because the correct declaration is
svar: String[20];
This will give you a string with maximum length 20 (the maximum
available length for a declaration like this is 255 which is equal to
ShortString).
Regards,
Sven
More information about the fpc-pascal
mailing list