-- Chapter 13 - Program 5 with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; procedure Access5 is type MY_RECORD is record Age : INTEGER; Initial : CHARACTER; Sex : CHARACTER; end record; type ACCESS_MY_DATA is access MY_RECORD; Myself : ACCESS_MY_DATA; Class : array(1..10) of ACCESS_MY_DATA; begin Myself := new MY_RECORD; Myself.Age := 34; Myself.Initial := 'D'; Myself.Sex := 'M'; for Index in 1..10 loop Class(Index) := new MY_RECORD; Class(Index).all := Myself.all; end loop; Class(3).Age := 30; Class(3).Initial := 'A'; Class(5).Initial := 'Z'; Class(8).Initial := 'R'; Class(6).Sex := 'F'; Class(7).Sex := 'F'; Class(2).Sex := 'F'; for Index in 1..10 loop Put("The class members age is"); Put(Class(Index).Age, 3); if Class(Index).Sex = 'M' then Put(" and his initial is "); else Put(" and her initial is "); end if; Put(Class(Index).Initial); New_Line; end loop; end Access5; -- Result of execution -- The class members age is 34 and his initial is D -- The class members age is 34 and her initial is D -- The class members age is 30 and his initial is A -- The class members age is 34 and his initial is D -- The class members age is 34 and his initial is Z -- The class members age is 34 and her initial is D -- The class members age is 34 and her initial is D -- The class members age is 34 and his initial is R -- The class members age is 34 and his initial is D -- The class members age is 34 and his initial is D