with Ada.text_io; with myDefs; with ada.IO_Exceptions; --use myDefs; procedure Pre_Poker5 is -- testing I/O someSuit: myDefs.suit; -- using definition of suit found in package myDefs someRank: myDefs.rank; -- using definition of rank found in package myDefs begin loop -- forever begin ada.text_io.put (" enter a suit "); -- prompt myDefs.suit_io.get (someSuit); -- get input ada.text_io.put (" enter a rank "); myDefs.rank_io.get (someRank); myDefs.suit_io.put (someSuit, 15); -- echo input myDefs.rank_io.put (someRank, 20); exception when ada.IO_Exceptions.Data_Error => -- e.g. clover instead of clubs ada.text_io.put_line (" the value you entered was not correct "); ada.text_io.put_line (" please try again "); ada.text_io.skip_line; when ada.IO_Exceptions.end_Error => ada.text_io.put_Line (" There is no more data for this program to process"); ada.text_io.put_line (" This program is ending now "); exit; end; end loop; end Pre_Poker5;