with ada.text_io; -- needed for the instantiations -- package (collection) of type definitions and instantiations package usefulStuff is -- Mysuit, Myrank and Player are declarations (definitions) of enumerated types-- --- type Mysuit is (clubs, diamonds, hearts, spades); type Myrank is (two, three, four, five, six, seven, eight, nine, ten, jack, queen, king, ace); type Player is (playerOne, playerTwo, tie); -- record declaration type card is record suit : Mysuit; rank: Myrank; end record; -- array declaration (notice it follows the declaration of the card type) type deck is array (1..52) of card; -- the next 3 lines are instantiations which allow reading and writing of the new types package suit_io is new ada.text_io.enumeration_io (Mysuit); package rank_io is new ada.text_io.enumeration_io (Myrank); package player_io is new ada.text_io.enumeration_io (Player); end usefulStuff; -- ada.text_io.enumeration_io is a GENERIC package -- what that means is that it contains code that needs a parameter to be used -- in the above cases the parameters are Mysuit, Myrank and Player