Maybe I misunderstand...
code: |
var stuff : flexible array 1 .. 3, 1 .. 6 of string
put "initialize elements"
for i : 1 .. upper (stuff)
stuff (i, 1) := "checking " + intstr (i)
end for
put "outputting elements"
for i : 1 .. upper (stuff)
put stuff (i, 1)
end for
put "new element"
new stuff, upper (stuff) + 1, 6
stuff (upper (stuff), 1) := "new 4"
put "outputting elements"
for i : 1 .. upper (stuff)
put stuff (i, 1)
end for |
A two dimensional array is just an array in which each element is another array. Changing the dimensions means adding another array to the end, or taking one off. Unless you are trying to change the size of the second arrays (that is, the ones inside the main array) in which case you Mr. Glib is right.
Quote:
Complex multi-dimensional flexible array reallocation not implemented yet - sorry.