[fpc-devel]Re: array of char
Florian Klaempfl
florian at klaempfl.de
Fri Sep 29 09:59:05 CEST 2000
Jonas Maebe schrieb:
> >Thus, the shortstring Concatenation operation truncated your string before
> >it is passed to the const.
>
> This is correct.
No, it isn't. The strings are concatened as ansistrings but
when writing the constant, the string is cut off to 255 chars, see
ptconst.pas
around line 540:
p:=comp_expr(true);
do_firstpass(p);
if p^.treetype=stringconstn then
begin
if p^.length>255 then
len:=255
^--- should we fix this?
else
len:=p^.length;
s[0]:=chr(len);
move(p^.value_str^,s[1],len);
end
More information about the fpc-devel
mailing list