Hi Kevan,
Yes, your "type Data ..." is the way to go. You can later declare arrays of type QData using
foo : Qdata (1..37);
bah : Qdata (6..100);
You can do simple loops like
for i in foo'first .. fool'last loop
foo (i) := i;
end loop;
or even
for i in bah'range loop
bah (i) := i*i;
end loop;
You can also use this method to handle GPC's conformant arrays formal parameters. So the Pascal code
procedure mary (var abc : Array[a..b] of Integer);
...
mary (foo);
mary (bah);
would become
procedure mary (abc : in out Qdata) is
...
mary (foo);
mary (bah);
The attributes 'first, 'last and 'range are Ada's way of giving you access to the properties (well attributes) of your arrays.
If you're using gnat you'll also find that it comes with a pretty printer. It only works on correct Ada code so it's usually the lats thing I do after a conversion using pa2ada. Try
gnatpp fred.adb
(see gnatpp --help for a list of options)
Cheers,
Leo
ps. The correct usage is Ada not ADA (the folks on comp.lang.ada will have a pink fit if you use ADA, they'll point out that it could be the Australian Dental Association). Ada is a name not an acronym.