declare
A : array (1 .. 3) of Integer := (1, 12, 42);
begin
for I in A'Range loop
Ada.Text_IO.Put (A (I)'Image);
if I /= A'Last then
Ada.Text_IO.Put (", ");
end if;
end loop;
end;
var
a: array of integer;
i: Integer;
begin
a := [1,12,42];
for i := Low(a) to High(a) do
begin
write(a[i]);
if i <> High(a) then write(', ');
end;
end.
declare
A : array (1 .. 3) of Integer := (1, 12, 42);
begin
for I in A'Range loop
Ada.Text_IO.Put (A (I)'Image);
if I /= A'Last then
Ada.Text_IO.Put (", ");
end if;
end loop;
end;
var
a: array of integer;
i: Integer;
begin
a := [1,12,42];
for i := Low(a) to High(a) do
begin
write(a[i]);
if i <> High(a) then write(', ');
end;
end.