|
-
May 27th, 2000, 05:01 AM
#1
Thread Starter
Lively Member
what is an enum or an enumeration?
-
May 27th, 2000, 05:19 AM
#2
transcendental analytic
It's a group of constants. If you have a lot of constants it may not be as organized and you want to have a shortcut to the right constants, you just need to enumerate a group of constants and declare a variable, property or whatever as that enumeration.
Code:
Enum EnmSize
None=0
Small=1
Medium=2
Big=3
Huge=4
end enum
Dim yoursize as EnmSize
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 27th, 2000, 05:23 AM
#3
put this in a module
Code:
Enum YesNoHello
Yess = 1
Noo = 2
Helloo = 3
End Enum
this is like the type, but this is read only..
well you can write to it, but it has to be directly in the enum statement...
call it like this
Code:
a = YesNoHello.Yess
MsgBox a
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
|