[fpc-pascal] dynamic array contents and system.move

Florian Klaempfl florian at freepascal.org
Tue Apr 27 11:50:15 CEST 2010

J├╝rgen Hestermann schrieb:
>>>>> There is a lot of ambigouity with dynamic arrays.
>>>> There certainly is if you expect them to work like regular arrays.
>>>> They are a quite different datatype.
>>> At least it should always mean the same independent from context.
>> It does always mean the same, just like a class instance always means
>> the same. It's just that implicit dereferencing is applied as soon as
>> you try to access an element (again, like with classes).
> That means that identifiers for open arrays are always pointers, 'just'
> with an automatic dereferencing when using square brackets for indexing?
> Then it should be possible to dereference such identifiers with ^ but
> it's not. 

A file type is actually also a record and you cannot access the fields
without an explict type cast.

> Why? That's the inconcistency I mean: There is no strict logic
> behind it.

Logic is nice but sometimes it makes no sense especially since you're
not supposed to access dyn. arrays by ^ becuase it usually breaks the
automatic management of dyn. arrays.

More information about the fpc-pascal mailing list