Enumerated Type - Visual Basic/VBA

Visual Basic/VBA

Enumerated datatypes in Visual Basic (up to version 6) and VBA are automatically assigned the "Long" datatype and also become a datatype themselves:

Enum CardSuit Clubs Diamonds Hearts Spades End Enum Sub EnumExample Dim suit As CardSuit suit = Diamonds MsgBox suit End Sub

Example Code in vb.Net

Enum CardSuit Clubs Diamonds Hearts Spades End Enum Sub EnumExample Dim suit As CardSuit suit = CardSuit.Diamonds MsgBox(suit) End Sub

Read more about this topic:  Enumerated Type

Famous quotes containing the words visual and/or basic:

    I may be able to spot arrowheads on the desert but a refrigerator is a jungle in which I am easily lost. My wife, however, will unerringly point out that the cheese or the leftover roast is hiding right in front of my eyes. Hundreds of such experiences convince me that men and women often inhabit quite different visual worlds. These are differences which cannot be attributed to variations in visual acuity. Man and women simply have learned to use their eyes in very different ways.
    Edward T. Hall (b. 1914)

    Mental health depends upon the maintenance of a balance within the personality between the basic human urges and egocentric wishes on the one hand and the demands of conscience and society on the other hand.
    Selma H. Fraiberg (20th century)