I script from 3 years but I have never used "enum".
Someone can explain me how to use it?
"enum"
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:
<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.
Code: Select all
enum <enum_name>
CONST_NAME1 := <value>,
CONST_NAME2 := <value>,
CONST_NAME3 := <value>,
CONST_NAME4 := <value>
endenumedit: you can check the distro SVN repository for more examples.