[fpc-pascal] more questions on storage

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Sep 26 16:20:40 CEST 2007

On 26 Sep 2007, at 15:12, Marc Santhoff wrote:

>>> And AnsiStrings are pretty much compatible to C's char*. Very handy.
>> Yes, though ansistrings may contain #0's.
> Interesting, how will a cast handle this case?
> Will it change the intermediate #0 to something else or will the
> resulting pchars be cut at first occurrence?

You just get a pointer to the string data as-is, without any  
substitutions or pointer juggling. If whatever you pass the data to  
interprets #0 as the end of the string, it will see that embedded #0  
as the end of the string.


More information about the fpc-pascal mailing list