Results 1 to 4 of 4

Thread: Questions (Not Problems)

  1. #1

    Thread Starter
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    Enum:

    A list of constants... How can I explain this... Look at the example:

    Enum MyEnum
    MyZero ' First value is zero if unspecified
    MyOne ' If value is unspecified, it equals (the value from before) + 1
    MyTwo
    MyThree
    MyEight = 8 ' Specified
    MyNine
    End Enum

    Dim Something As MyEnum

    Something = MyZero ' Something = 0
    Something = MyTwo ' Something = 2
    Something = MyNine ' Something = 9


    This probably wasn't the best explanation... Check online help...

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: [email protected]
    ICQ: 19552879
    AIM: RYoni69


    [This message has been edited by Yonatan (edited 11-21-1999).]

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    To enumerate something is, basically, to assign a number value to a string of text. Here's an example of some code I have in one of my programs:
    Code:
    Public Enum WA_Turn
    C = &H1303&
    CC = &H1304&
    Around = &H1305&
    End Enum
    
    Public Sub Turn(Direction As WA_Turn)
    Message(Direction)
    End Sub
    When the programmer types "Turn(", a pop-up box will display, listing ONLY the three values in the WA_Turn enumeration. Easy way of eliminating unessecary items, while making it easier to remember (CC is easier than &H1304&)

    ------------------
    (¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: [email protected]
    ICQ#: 9872708

  3. #3
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184

    Post

    I have A few Q's that I want to know.

    What(s) a/is Enum?? Whats it do, I just dont know.

    --

    Becuase I bought the learning Ed. is there like no way to make like DLL files , Active X Mod. and All the other cool stuff.. Is there some software I could download??

    ---

    Using a data base, how do I Specify this:
    Put Box a, 3 in TestDB....??

    -----

    How do you specify what variables to record in a ini file.

    -----

    Thankyou!!

  4. #4
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    Hi ShadowCrawler..

    Would you please go further in explaning what is the common use of Enum. I'm just like (Dayo312), I read about it a lot but with no clue about it's possible use.
    If you may, would you post some simple example?

    Thanx for sharing & helping.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width