with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Directions is type Direction is (North, South, East, West, Up, Down); Reverse_Direction : constant array(Direction) of Direction := (North => South, South => North, East =>West, West => East, Up => Down, Down => Up); function To_Direction(Text : Unbounded_String) return Direction; -- Converts Text to Direction; raises Constraint_Error if it's not -- a legal direction. function Is_Direction(Text : Unbounded_String) return Boolean; -- Returns TRUE if Text is a direction, else false. end Directions;
You may also see the corresponding body. The following compilation units refer to ("with") Package spec Directions:
This hypertext format was generated by David A. Wheeler's ada2html