home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / docs / lovelace / small.adb < prev    next >
Encoding:
Text File  |  1995-11-21  |  894 b   |  35 lines

  1.  
  2.   -- Main routine to start up "Small", a small text adventure game to
  3.   -- demonstrate Ada 95.
  4.  
  5.   -- This version (C) 1995 Ada Resource Association, Columbus, Ohio.
  6.   -- Permission is granted to use this program for any purpose,
  7.   -- commercial or not, as long as credit is given to David A. Wheeler
  8.   -- as the original developer.
  9.  
  10.   -- For documentation see the following URL:
  11.   --   http://lglwww.epfl.ch/Ada/Tutorials/Lovelace/small.htm
  12.  
  13. with Text_IO, Ada.Strings.Unbounded, Ustrings, World;
  14. use  Text_IO, Ada.Strings.Unbounded, Ustrings;
  15.  
  16. with Parser;
  17.  
  18. procedure Small is
  19.   Command : Unbounded_String; -- Contains user's current command.
  20.   Quit    : Boolean := False;
  21. begin
  22.  Put_Line("Welcome to a Small World!");
  23.  
  24.  World.Setup;
  25.  
  26.  while not Quit loop
  27.   New_Line;
  28.   Put_Line("Your Command?");
  29.   Get_Line(Command);
  30.   Parser.Execute(Command, Quit);
  31.  end loop;
  32.  
  33.  Put_Line("Bye!");
  34. end Small;
  35.