[M3devel] Array indexing
Dariusz Knociński
dknoto at next.com.pl
Thu Dec 30 22:17:19 CET 2010
On Thu, 30 Dec 2010 14:12:22 -0600
"Rodney M. Bates" <rodney_bates at lcwb.coop> wrote:
[...]
> As a workaround, you can change the row constructors to fixed array constructors:
>
> CONST
> tab = ARRAY [0..2], [0..15] OF CARDINAL {
> ARRAY [0..15] OF CARDINAL
> { 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17 },
> ARRAY [0..15] OF CARDINAL
> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 17, 17, 17, 17, 17, 17 },
> ARRAY [0..15] OF CARDINAL
> { 17, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17 }
> };
>
Thankyou very much for workaround.
> Amazing that in all these years, nobody has coded a 2-D array constructor this
> way before, or at least didn't complain.
>
>
Code similar to this I found on pages in tutorial, in chapter "Array Constructor":
tictactoe := ARRAY [1..3], [1..3] OF CHAR{
ARRAY OF CHAR{' ', ' ', ' '},
ARRAY OF CHAR{' ', ' ', ' '},
ARRAY OF CHAR{' ', ' ', ' '}
};
Best regards
Dariusz Knociński.
More information about the M3devel
mailing list