[fpc-pascal] Illogical automatic dereferencing

Florian Klaempfl florian at freepascal.org
Sun Oct 11 17:54:45 CEST 2009


Henry Vermaak schrieb:
> 2009/10/11 "Vinzent Höfler" <JeLlyFish.software at gmx.net>:
>> Henry Vermaak <henry.vermaak at gmail.com>:
>>
>>> Thanks for the explanation, I was under the impression that arrays in
>>> Pascal were similar to C.  How do you explain the "automatic"
>>> dereferencing with a pointer to an array that Jürgen is talking about?
>> Those are dynamic arrays, IOW pointers disguised as arrays. This is part of the problem, if not the problem itself.
> 
> No, it happens with static arrays,  if you set pia := @ia, ia[x] and
> pia[x] will give you the same result (in delphi mode, at least).

It's simply more readable and a shortcut.



More information about the fpc-pascal mailing list