[fpc-devel] TFPList.Pack

Micha Nelissen micha at neli.hopto.org
Wed Oct 4 09:36:35 CEST 2006


Peter Vreman wrote:
>> Micha Nelissen wrote:
>>> Hi,
>>>
>>> psrc:=@FList[0], is this correct ? Shouldn't it be FList^, since FList
>>> is a pointer to an array of pointers ?
> 
> It is correct. It is the address of the first pointer in the array of
> pointers.

Conceptually, it is wrong. On the implementation level it may be correct.

FList = ^(array[0..Max] of Pointer);
FList[0] = (array[0..Max] of Pointer);
@FList[0] = ^(array[0..Max] of Pointer) = FList;

So address:
(@FList[0])[1] = (ptrint(FList) + 1 * sizeof(array[0..Max] of Pointer)));

Micha



More information about the fpc-devel mailing list