-- Chapter 6 - Programming exercise 3 with Ada.Text_IO; use Ada.Text_IO; procedure Ch06_3 is type MY_ENUM is (YES, NO, MAYBE, WHY, POSSIBLY); Answer : MY_ENUM := YES; begin Answer := MY_ENUM'PRED(Answer); end Ch06_3; -- Result of execution -- Exception never handled: constraint_error -- Value 0 out of range 1..4. -- (This means that since the range of the enumerated variable -- only covers four values, trying to assign the value of zero, -- which is one less than the allowed minimum causes us to go -- out of the allowable range. )