[Lazarus] strcat problem

Koenraad Lelong lazarus2 at de-brouwerij.be
Thu Jun 23 21:08:14 CEST 2016


Op 23-06-16 om 16:58 schreef David W Noon:
> [snip]
>> cTekst:=#13'Now is the winter of our discontent'#13;
>
> You need a trailing #0 byte on the end.
>

The definition of cTekst :
var
    cTekst : PChar;

So the compiler knows cTekst is a 0-terminated string doesn't, it ?
And StrCat needs two parameters : PChar and PChar. So I think the 
compiler knows the strings are zero-terminated.
Besides, on my OpenSuse-box it works, or is that by chance ?

Koenraad.




More information about the Lazarus mailing list