From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_20,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!seas.gwu.edu!mfeldman From: mfeldman@seas.gwu.edu (Mike Feldman) Newsgroups: comp.lang.ada Subject: test program for enumeration_IO Message-ID: <1847@sparko.gwu.edu> Date: 8 May 90 00:43:20 GMT Reply-To: mfeldman@seas.gwu.edu (Mike Feldman) Organization: The George Washington University, Washington D.C. List-Id: WITH Text_IO; PROCEDURE Colors IS TYPE English_Colors IS (white, black, red, purple, blue, green, yellow, orange); TYPE French_Colors IS (blanc, noir, rouge, pourpre, bleu, vert, jaune, orange); PACKAGE English_Color_IO IS NEW Text_IO.Enumeration_IO (Enum => English_Colors); PACKAGE French_Color_IO IS NEW Text_IO.Enumeration_IO (Enum => French_Colors); Eng_Color : English_Colors; Fr_Color : French_Colors; Position : Natural; BEGIN Text_IO.Put (Item => "Please enter an English color >"); English_Color_IO.Get (Item => Eng_Color); Position := English_Colors'Pos(Eng_Color); Fr_Color := French_Colors'Val(Position); Text_IO.Put (Item => "The French color is "); -- the first line below will compile; -- will the second line? French_Color_IO.Put (Item => Fr_Color); French_Color_IO.Put (Item => Fr_Color, Set => Lower_Case); Text_IO.New_Line; END Colors;