Page 1 of 1
"enum"
Posted: Sat Feb 04, 2006 10:19 am
by zandor
I script from 3 years but I have never used "enum".
Someone can explain me how to use it?
Posted: Sat Feb 04, 2006 11:02 am
by Tritan
I am not sure what you are talking about here.
Can you explain a little better what you mean by enum?
Is it EnumerateOnlineCharacters?
Is it EnumerateItemsInContainer?
Those are the only things I can think of that have that in it.
Posted: Sat Feb 04, 2006 5:53 pm
by melanius
enumerator is a language feature used to define a set of constants. It is usually used when you have to declare more than 4 constants, instead of typing const a hundred times, you define an enumerator in the form:
Code: Select all
enum <enum_name>
CONST_NAME1 := <value>,
CONST_NAME2 := <value>,
CONST_NAME3 := <value>,
CONST_NAME4 := <value>
endenum
<enum_name> any string value name such as MY_ENUMARATION, and <value>, whatever can be defined as a constant.
edit: you can check the distro SVN repository for more examples.