''
'' 枚举声明整型常数的简单方法:
'' (除非显式分配,第一个将是零,下面的只是递增)
enum
A
B
C
D = 123
E
end enum
print A, B, C, D, E
''
'' 使用它们来表示选项是很常见的:
''
enum
SAY_HELLO
SAY_HI
SAY_BYE
SAY_SEEYOU
end enum
sub saySomething( byval what as integer )
select case what
case SAY_HELLO, SAY_HI
print "hello"
case SAY_BYE, SAY_SEEYOU
print "bye"
end select
end sub
saySomething( SAY_HELLO )
saySomething( SAY_BYE )