-- Chapter 32 - Program 4 with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, ada.Integer_Text_IO; procedure EnumRep is type MOTION is (STOPPED, NORTH, EAST, SOUTH, WEST); for MOTION use (STOPPED => 0, NORTH => 1, EAST => 2, SOUTH => 4, WEST => 8); Robot_Direction : MOTION := STOPPED; begin Robot_Direction := MOTION'LAST; -- WEST Robot_Direction := MOTION'PRED(Robot_Direction); -- SOUTH end EnumRep; -- Result of execution -- (There is no output from this program)