Question: Loops tables - why is there no order

Using a loop to put values into a double indicie, the output table is not organized.

for i from 1 to 4 do
  for j from 1 to 3 do
    a[i,j]:=5*i;
  end do;
end do;

print(a);

table([(3, 2) = 15, (3, 3) = 15, (4, 1) = 20, (4, 2) = 20, (2, 2) = 10, (1, 2) = 5, (2, 1) = 10, (1, 3) = 5, (1, 1) = 5, (3, 1) = 15, (4, 3) = 20, (2, 3) = 10])

One would expect the table to be organized in some fashion but I suppose it has something to do with internal memory values?  On conversion to a list the numbers are transferred as they are listed.  Of course with some maple prodding the list can be organized in any way but the question remains as why the table isn't produced in the way the loop was calculated?

Please Wait...