spir <denis.s...@gmail.com>:

> Sure, but this is just a matter of convention and support by a given
> compiler:
>       type    Integers = array of Integer;
>       var     ints : Integers = [1,2,3];
> could work as expected by automatically sizing, allocating and
> initialising. How else could work languages that have an array/sequence/
> list literal notation?

How else!? Are you seriously asking that?

By statically determining the array bounds from the initialization expression, 
of course? C does it that way, Ada does, too, other languages also. In both 
implementations it is still not a dynamic array, because although the space may 
be allocated "dynamically" (on the stack), the bounds do not change anymore, so 
the size remains static after the declaration.

Apart from some obscure algorithms ;) that rely on reallocation and dynamically 
changing the size, such a one-time allocation is even the most common use of 
"dynamic" arrays.


Vinzent.
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to