<-- Previous || Up || Next -->

Spell Playing Card Function
Math Probability Class

Public Function SpellPlayingCard( _
    ByVal vCard As Variant _
    ) As Variant

"Spell Playing Card Abbreviation" or "Playing Card Abbreviation To Name"
Converts from a card abbreviation like "AS" into a card name like "Ace of Spades"

    SpellPlayingCard("7C") = "Seven of Clubs"
    SpellPlayingCard("AS") = "Ace of Spades"
    SpellPlayingCard("10D") = "Ten of Diamonds"
    SpellPlayingCard("JA") = "Joker of Aces"
    IsNull(SpellPlayingCard("JD")) = True
See also:
    DealPlayingCardDecks Function
    Spellings Class
vCard: String containing a playing card abbreviation such as "7C" or "AS" or "10D" which will be spelled out. Function returns Null if vCard is Null or cannot be fixed up to a String.
Note: Matches are case-insensitive, so for example, the card abbreviations "7c" and "7C" both refer to the same card, the seven of clubs.

Summary: Each card is represented by a two- or three-character string that describes the number of the card and its suite. The card abbreviation is composed of one value from each of the following tables:
Card Numbers:

    1      Joker
    2..10  Numbered cards 2 through 10
    J      Jack
    Q      Queen
    K      King
    A      Ace
Card Suites:
    A  Aces
    C  Clubs
    D  Diamonds
    S  Spades
When Jokers are used, this function and DealPlayingCardDecks only recognize Jokers as belonging to the Aces and Clubs suites.
Return value: Function usually returns Null if the card abbreviation vCard is invalid. Function may have an unpredictable return value if vCard is invalid.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.