Martin <laza...@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
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to