|
-
Nov 21st, 1999, 01:00 AM
#1
Thread Starter
Guru
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).]
-
Nov 21st, 1999, 05:49 AM
#2
Member
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
-
Nov 21st, 1999, 12:53 PM
#3
Addicted Member
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!!
-
Nov 22nd, 1999, 01:53 AM
#4
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|