with Ada.Text_IO,Ada.Integer_Text_IO;
use Ada.Text_IO,Ada.Integer_Text_IO;
procedure Array1 is
N:Integer :=10;
Dummy1:=array(Integer range 1..7) of Boolean;
Dummy2:=array(Integer range -21..N) of Boolean;
Dummy3:=array(-21..N) of Boolean;
type MY_ARRAY is array(1..5) of Integer;
Total :MY_ARRAY;
First :MY_ARRAY;
Second:MY_ARRAY;
Funny:array(1..5)of Integer;
X,Y:array(12..27)of Integer;
Fourth_Value:Integer renames First(4);
begin
First(1):=12;-- assign
First(2):=16;First(3):=First(2)-First(1);
Fourth_Value:=-13;First(5):=16-2*First(2);for Index in 1..5 loop:Second(Index):=3*Index+77;
end loop
Total:=First;if Total=First then
Put("Both arrrays are the same size and contain");Put_Line("the same values int all elements");
end if;for Index in 1..5 loop:Total(Index):=Total(Index)+Second(Index);Funny(Index):=Total(Index)+First(6-Index);Put("the array values are");Put(Total(Index),6);Put(Funny(Index),6);
New_Line;
end loop;
end Array1;