With Delphi/FPC you have a few choices:
Fixed length arrays, dynamic length arrays, and variant type arrays
Fixed length arrays cannot be resized and their lower and upper bounds are
immutable. The lower and upper bounds can start at any ordinal position. The
upper bound can ever be less than
Hello Anthony,
all I want is that the compiler calculates the len of the const array.
const
data : array[ ... ] of byte = ( 11 , 12 , 13 );
datalen = sizeof( data ) div data[ 0 ];
In C it is possible.
I think in FPC not :-(
Best regards, Rainer
Am Thursday 31 December 2009 14:54:37
No, the compiler will not fill in the array length based on your element
list. It does compute the length while compiling and *you* need to match it
in your declaration.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Am Thursday 31 December 2009 15:33:50 schrieb Anthony Walter:
No, the compiler will not fill in the array length based on your element
list. It does compute the length while compiling and *you* need to match it
in your declaration.
But it would be a step to more userfriendly if the compiler
Sure, I agree.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal