Sorry about that po. Should have been:
global kind$="" global name$="" global amount=0 global no_suits=4; set up number of suits global no_cards_suit=13; number of cards in each suit dim cards(no_suits,no_cards_suit); dim the array dim suit_name$(no_suits) ; set up the suits array, so you can easily pull names from it suit_name$(1)="Spades" suit_name$(2)="Clubs" suit_name$(3)="Hearts" suit_name$(4)="Diamonds" repeat suit=rand(1,4) ; generate a random suit card=rand(1,13) ; generate a random card number until cards(suit,card)=1 ; keep looping till you find a card that is 'there' cards(suit,card)=0 if card=1 then name$="Ace":kind$=suit_name$(suit):amount=11 elseif card=11 then name$="Jack":kind$=suit_name$(suit):amount=10 elseif card=12 then name$="Queen":kind$=suit_name$(suit):amount=10 elseif card=13 then name$="King":kind$=suit_name$(suit):amount=10 else name$=card:kind$=suit_name$(suit):amount=card end if