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.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to