I have no idea what you're trying to do.
Obviously you're expecting A to be square (or cubic, or hyper-cubic, or ...), to
have indices of an integer type, and to have lower bounds of 1. None of these
are necessarily true.
Multi-dimensional arrays need not be square, so A'range (X) might reference
dimensions of A that don't exist (if it were allowed).
Array indices can be of any discreet type, including enumeration types. I don't
know what A'range (Green) or A'range ('E') would mean.
Even if an array has integral indices, the lower bound need not be 1. Again,
A'range (X) might reference dimensions of A that don't exist.
I can't see what you'd have in place of "null;" for a 1000-dimension array. You
can reference the whole array (A) or index a specific component of A, which
requires as many indices as A has dimensions. You have 2 indices, X and Y; where
are you going to get the other 998 indices?
In general, you iterate over an N-dimensional by having N nested "for" loops, 1
for each dimension of the array:
type Three_D is array (1 .. 3, 7 .. 300, 'A' .. 'Z') of Integer;
A : Three_D;
for I in A'range (1) loop
for J in A'range (2) loop
for K in A'range (3) loop
-- Do something with A (I, J, K)
end loop;
end loop;
end loop;
--
Jeff Carter
"Ada has made you lazy and careless. You can write programs in C that
are just as safe by the simple application of super-human diligence."
E. Robert Tisdale
72