ENUM

Top  Previous  Next

Syntax

ENUM name

Description

Begins definition of enumerated constants.

Parameters

name - Name of the enumeration

Return value

None

Remarks

Each enumeration value is sequentially numbered, starting from 1. You can override the starting value of any enumerated constant. The enumeration name becomes a type define for INT, so it can be used as a parameter to a subroutine, or defined like any other variable type.

 

The enumeration of constants is terminated with the ENDENUM statement.

Example usages

ENUM days
 monday
 tuesday
 wednesday
 thursday
 friday
 saturday
 sunday
ENDENUM
 
def payday as days
payday = thursday
 
ENUM dialog_messages
  WM_FUDGE = WM_USER
  WM_ICECREAM
  WM_CHOCOLATE
ENDENUM
 
ENUM colors
   red = 27, green, blue, orange, purple
ENDENUM