[fpc-pascal] dynamic array contents and system.move
florian at freepascal.org
Sun Apr 25 13:00:16 CEST 2010
Jürgen Hestermann schrieb:
>> Florian Klaempfl schrieb:
>> Simply because dereferencing a dyn. arrays makes no sense because
>> it is more than just a simply data collection.
> Realy? What else is happening in the background?
Reference counting (also of the stored data), automatic length storage.
>> This is plainly wrong. When indexing a dyn. array, the compiler
>> generates the correct code to access the data, no more no less.
> So what is the difference between 'MyArray' and 'MyArray^'?
MyArray enforces range checking if it is enabled, further
differences, see below.
> they mean the same address?
I would expect to get @MyArray-sizeof(pointer)*2 when doing MyArray^
(which is not allowed), because this is the start of the actual array
More information about the fpc-pascal