[fpc-pascal] Illogical automatic dereferencing
"Vinzent Höfler"
JeLlyFish.software at gmx.net
Mon Oct 12 22:03:13 CEST 2009
Martin <lazarus at mfriebe.de>:
> The beauty of the current solution is that static and dynamic arrays can
> be substituted with each other, simple by changing the declaration, and
> adding/removing a setlength. All other code can be left as it is.
No, because of subtle differences in the handling of "out" parameters. Dynamic arrays don't retain their length then. I fell into that trap a couple of years ago.
BTW, the expression "@DynamicArray" should really return the address of the first element, not the address of the pointer to the array structure. It somehow destroys the abstraction. And I can't imagine any situation where the pointer might be of the interest for the user of the abstraction.
(Yes, I'm aware of that it's not going to change, so just acknowledge that as my opinion.)
Vinzent.
--
Neu: GMX DSL bis 50.000 kBit/s und 200,- Euro Startguthaben!
http://portal.gmx.net/de/go/dsl02
More information about the fpc-pascal
mailing list