[fpc-pascal] Constant strings can't be longer than 255 chars
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Jul 7 19:36:07 CEST 2008
On 07 Jul 2008, at 18:26, Graeme Geldenhuys wrote:
> I've got a few functions defined with 'const' string parameters. When
> I tried to pass a large string, I got the following error message. Why
> is that?
Because the scanner only handles shortstrings for speed reasons. You
can construct longer strings by concatenating multiple shorter strings
(they will be concatenated at compile time).
So
someproc('this string can be 255 characters' + 'and this one as well');
Jonas
More information about the fpc-pascal
mailing list