ArcBasicDocs

Enum

Enum Name value, value = number, ... End Enum

Parameters

None.

Description

Gives a group of related whole numbers names, so code says what it means: State.Jumping instead of 2. The first value is 0 and each one after is one more, unless given a number with =, which the ones after then count on from. Write a value as Name.Value, or just Value when no other Enum has a value of that name and nothing else in the program is called that.

Enum values are fixed, like a Const. They can be used anywhere a number can, including in Select.

Example

Enum.abs
Enum State    Idle, Walking, Jumping    Dead = 99End EnumIf player\state = State.Jumping Then ...

See also