[fpc-pascal] Illogical automatic dereferencing
Jürgen Hestermann
juergen.hestermann at gmx.de
Mon Oct 12 10:56:22 CEST 2009
>> 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.
It's definitely the opposite: It is *less* readable because it leaves it
unclear what data you are operating with. Enumerating a pointer makes
you think that you are enumerating an array. That was the origin of the
whole threat because someone was not clear about what to use as
parameter in MOVE. It is no longer logical what a written identifier
means: A pointer or an array.
More information about the fpc-pascal
mailing list