[fpc-devel] TFPList.Pack

Peter Vreman peter at freepascal.org
Sat Oct 7 17:17:46 CEST 2006


At 09:36 4-10-2006, you wrote:
>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)));

It should be FList^[0]. Just like it is used the other methods of the 
TFPList class


Peter




More information about the fpc-devel mailing list