-- Chapter 20 - Program 7 with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; procedure Infix is type THREE_INTS is record Length, Height, Width : INTEGER; end record; Big, Medium, Sum : THREE_INTS; function "+"(Record1, Record2 : THREE_INTS) return THREE_INTS is Temp : THREE_INTS; begin Temp.Length := Record1.Length + Record2.Length; Temp.Height := Record1.Height + Record2.Height; Temp.Width := Record1.Width + Record2.Width; return Temp; end "+"; begin Big.Length := 10 + 2; Big.Height := 22; Big.Width := 17; Medium.Length := 5; Medium.Height := 7; Medium.Width := 4; Sum := Big + Medium; Put("The sum is"); Put(Sum.Length, 4); Put(Sum.Height, 4); Put(Sum.Width, 4); New_Line; end Infix; -- Result of Execution -- The sum is 17 29 21