[fpc-pascal] more questions on storage

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Sep 26 12:56:37 CEST 2007

On 26 Sep 2007, at 12:03, Marco van de Voort wrote:

>> Am Mittwoch, den 26.09.2007, 11:34 +0200 schrieb Marco van de Voort:
>>> The field is a pointer to the ansistring. Which is basically a  
>>> pchar with a
>>> TAnsirec record on negative offset of the ptr value.
>> Thanks, that's what I assumed and could not proof.
>> Is this the case for any occurences of AnsiString, the type name  
>> itself
>> is a pointer behind the scenes or only in this special case of an  
>> array
>> (would make less sense)?
> In general, and can be nil when empty.

And it's reference counted, so any record containing an ansistring  
has initialization rtti (and when declaring a record of this type, or  
allocating memory for it using new(), the compiler initialises the  
ansistring fields with nil).


More information about the fpc-pascal mailing list