bug0165.pp 240 B

12345678910111213
  1. Program bug0165;
  2. { No range check when -Cr given}
  3. Type Directions = (North, East,South,West);
  4. Var Go : Directions;
  5. begin
  6. Go:=North;
  7. Go:=Pred(Go); { must give run-time error }
  8. Go:=Pred(North); { must give compile time error }
  9. end.