[fpc-pascal] Const Array Length (was Dynamic Array Length)

Jürgen Hestermann juergen.hestermann at gmx.de
Sun Jan 3 14:40:25 CET 2010



> Rainer Stratmann schrieb:
>> Pascal has better ways to deal with array bounds.
> But at this moment it is not possible to make a const array with auto 
> calculated range ( [ 1..] ). It would be easy to implement, I think.

But these things are not related. Calculating array bounds should 
not be dependend on the array type (and its declaration).

When determining the number of elements in an array I therefore also think 
that sizeof() or High()-Low()+1 would be the best. And that should also
be the case for constant arrays with auto size calculation (if someone 
finds the time to implement it and if it can be done easily).



More information about the fpc-pascal mailing list