[fpc-pascal] property of an array
Joost van der Sluis
joost at cnoc.nl
Sun Jan 4 11:25:40 CET 2009
Op zaterdag 03-01-2009 om 19:04 uur [tijdzone -0500], schreef Jeremy
Cowgar:
> myObj.ColumnNames := [ 'Id', 'Name', 'Age' ];
> Error: Ordinal expression expected
A list of values between square brackets are a set, not an array.
You'll have to do:
AnArray[0] := 'Id';
anArray[1] := 'Name';
anArray[2] := 'Age';
myObj.ColumnNames := AnArray;
Or create a constant array and use that.
Joost.
More information about the fpc-pascal
mailing list