<p>Am 23.06.2016 21:41 schrieb "David W Noon" <<a href="mailto:david.w.noon@googlemail.com">david.w.noon@googlemail.com</a>>:<br>
> > Op 23-06-16 om 16:58 schreef David W Noon:<br>
> >> [snip]<br>
> >>> cTekst:=#13'Now is the winter of our discontent'#13;<br>
> >><br>
> >> You need a trailing #0 byte on the end.<br>
> >><br>
> ><br>
> > The definition of cTekst : var cTekst : PChar;<br>
> ><br>
> > So the compiler knows cTekst is a 0-terminated string doesn't, it<br>
> > ?<br>
><br>
> The cTekst variable is actually a pointer.<br>
><br>
> It's the string literal that needs the trailing NUL byte.</p>
<p>The compiler guarantees that constant strings are NUL terminated. This is needed for easy conversion to PChar.</p>
<p>Regards,<br>
Sven</p>