[fpc-pascal] PChar & AnsiString

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Tue Jun 1 12:33:12 CEST 2010


2010/6/1 spir ☣ <denis.spir at gmail.com>:
> * Like C strings, and unlike AnsiString-s (even if the latter also are "pointed")

Sure if you cast an AnsiString to a PChar it will only go until the
first #0. You can't magically add capabilities to the PChar type.

> * How is length computed (traversal?)?

It isn't computed, it is stored as part of the string in memory. 4
bytes, so a string can go up to 2GB in size.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list