Skip to content

Enum_list

See Also

Purpose

To define an enumerated list of constants.

Syntax

Enum_List
    Define {symbol}{symbol}
    :
    Define {symbol}{symbol}
End_Enum_List

What It Does

Enum_List assigns sequential integer values to constant identifiers created by embedded Define commands starting with zero.

Example

The following example will create 4 constant identifiers:

Enum_List
    Define zeroth
    Define first second third
End_Enum_List

In this example, the symbol "zeroth" will have the value of zero (0). "First" will be 1, "second" will be 2, and "third" will be 3.

The following example is an enumeration list that represents sets of Windows mouse messages. Notice the use of the Define…For in the list to set ranges of sequential values:

Enum_List
    // Mouse messages.
    Define WM_MOUSEMOVE      FOR 512
    Define WM_LBUTTONDOWN
    Define WM_LBUTTONUP
    Define WM_LBUTTONDBLCLK
    Define WM_RBUTTONDOWN
    Define WM_RBUTTONUP
    Define WM_RBUTTONDBLCLK
    Define WM_MBUTTONDOWN
    Define WM_MBUTTONUP
    Define WM_MBUTTONDBLCLK
End_Enum_List