-- Chapter 32 - Program 3 with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; procedure PackItIn is type LITTLE1 is range 1..57; type LITTLE_REC1 is record A, B, C : LITTLE1; end record; type LIST1 is array(1..5) of LITTLE_REC1; type LITTLE2 is range 1..57; type LITTLE_REC2 is record A, B, C : LITTLE2; end record; pragma PACK(LITTLE_REC2); type LIST2 is array(1..5) of LITTLE_REC2; pragma PACK(LIST2); type LITTLE3 is range 1..57; for LITTLE3'SIZE use 8; type LITTLE_REC3 is record A, B, C : LITTLE3; end record; pragma PACK(LITTLE_REC3); type LIST3 is array(1..5) of LITTLE_REC3; pragma PACK(LIST3); begin Put("Type LITTLE1 uses "); Put(LITTLE1'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LITTLE_REC1 uses "); Put(LITTLE_REC1'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LIST1 uses "); Put(LIST1'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LITTLE2 uses "); Put(LITTLE2'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LITTLE_REC2 uses "); Put(LITTLE_REC2'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LIST2 uses "); Put(LIST2'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LITTLE3 uses "); Put(LITTLE3'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LITTLE_REC3 uses "); Put(LITTLE_REC3'SIZE, 5); Put_Line(" bits for its representation."); Put("Type LIST3 uses "); Put(LIST3'SIZE, 5); Put_Line(" bits for its representation."); end PackItIn; -- Result of execution, Compiler 1. (Did not support Line 28) -- Type LITTLE1 uses 16 bits for its representation. -- Type LITTLE_REC1 uses 48 bits for its representation. -- Type LIST1 uses 240 bits for its representation. -- Type LITTLE2 uses 16 bits for its representation. -- Type LITTLE_REC2 uses 32 bits for its representation. -- Type LIST2 uses 160 bits for its representation. -- Type LITTLE3 uses 16 bits for its representation. -- Type LITTLE_REC3 uses 32 bits for its representation. -- Type LIST3 uses 160 bits for its representation. -- Result of execution, Compiler 2. (Did support Line 28) -- Type LITTLE1 uses 6 bits for its representation. -- Type LITTLE_REC1 uses 24 bits for its representation. -- Type LIST1 uses 120 bits for its representation. -- Type LITTLE2 uses 6 bits for its representation. -- Type LITTLE_REC2 uses 22 bits for its representation. -- Type LIST2 uses 120 bits for its representation. -- Type LITTLE3 uses 8 bits for its representation. -- Type LITTLE_REC3 uses 24 bits for its representation. -- Type LIST3 uses 120 bits for its representation.