[fpc-devel] Concatenating huge AnsiStrings
Marco van de Voort
fpc at pascalprogramming.org
Fri Jun 21 20:03:56 CEST 2024
Op 21-6-2024 om 19:39 schreef Bart via fpc-devel:
> Possibly not a real-world problem, but some pet-project of mine has to
> deal with it (at least in theory).
>
> What happens if you try to concatenate 2 huge ansistrings, such that
> Length(String 1) + Length(String 2) > High(SizeInt)?
> All this assuming you have memory enough to perform such an operation ;-)
>
> Will this trigger some sort of error, or will it silently ditch all
> characters beyond High(SizeInt), like concatenating two long
> shortstrings do if the combined length would be > 255?
>
Probably terminate with a heap out of memory error.
More information about the fpc-devel
mailing list