-- Chapter 12 - Program 4 with Ada.Text_IO; use Ada.Text_IO; procedure Record4 is type MONTH_NAME is (JAN,FEB,MAR,APR,MAY,JUN,JUL, AUG,SEP,OCT,NOV,DEC); type DATE is record Month : MONTH_NAME; Day : INTEGER range 1..31; Year : INTEGER range 1776..2010; end record; type PERSON is record Name : STRING(1..15); Birth_Day : DATE; Age : INTEGER := 15; Sex : CHARACTER := 'M'; end record; Teacher : PERSON; Class_Member : array(1..35) of PERSON; Standard : constant PERSON := ("John Q. Doe ", (MAR, 27, 1955), 33, 'M'); type EMPTY_RECORD is record null; end record; type ANOTHER_EMPTY_RECORD is null record; begin Teacher.Name := "John Q. Doe "; Teacher.Age := 21; Teacher.Sex := 'M'; Teacher.Birth_Day.Month := OCT; Teacher.Birth_Day.Day := 18; Teacher.Birth_Day.Year := 1938; for Index in Class_Member'RANGE loop Class_Member(Index).Name := "Suzie Lou Q "; Class_Member(Index).Birth_Day.Month := MAY; Class_Member(Index).Birth_Day.Day := 23; Class_Member(Index).Birth_Day.Year := 1956; Class_Member(Index).Sex := 'F'; end loop; Class_Member(4).Name := "Little Johhny "; Class_Member(4).Sex := 'M'; Class_Member(4).Birth_Day.Day := 17; Class_Member(7).Age := 14; Class_Member(2) := Standard; Class_Member(3) := Standard; end Record4; -- Result of execution -- (No output from this program.)