[fpc-pascal] Illogical automatic dereferencing

Graeme Geldenhuys graemeg.lists at gmail.com
Sat Oct 10 14:59:16 CEST 2009


2009/10/10 Jürgen Hestermann <juergen.hestermann at gmx.de>:
>
> It is illogical that I am able to enumerate a pointer as if it was an array.
> So the brackets do the dereferencing automatically. When I write X[1] it
> assumes I meant X^[1]. To the user it behaves the same as if X was an array
> instead of a pointer to an array. There is no difference in syntax which is
> wrong IMO. It's not wonder that many users think it *is* an array.

I have to agree 100%. This is what through me off a few days ago as
well. Plus I haven't used pointers and pointers to array structures in
many years. But yes, the syntax is inconsistent with other syntax
rules.



-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list