[fpc-pascal] Constant strings can't be longer than 255 chars

Florian Klaempfl florian at freepascal.org
Mon Jul 7 19:39:25 CEST 2008


Jonas Maebe schrieb:
> 
> 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).

Maybe we should fix this and introduce a patternl (for long) for 
cstring, there are only a few places in the compiler where this used.



More information about the fpc-pascal mailing list