Gambas Documentation - /cat/enumdecl

/cat/enumdecl

# Enumeration declaration

{ PUBLIC | PRIVATE } ENUM Identifier [ = Value ] [ , Identifier [ = Value ] ... ]

This keyword declares an enumeration, i.e. a list of integer constants.

If the Value of a constant is not specified, then it is the value of the previous constant plus one, or zero for the first constant.

All constants are accessible everywhere in the class they are declared.

If the `PUBLIC` keyword is specified, they are also accessible to the other classes having a reference to an object of this class.

### Examples

    Public Enum Normal = &H00, {Left} = &H01, {Right} = &H02, Center = &H03, TopNormal = &H10, TopLeft = &H11, TopRight = &H12, Top = &H13,
      BottomNormal = &H20, BottomLeft = H21, BottomRight = &H22, Bottom = &H23

    Private Enum None, Horizontal, Vertical, Row, Column, Fill

### See also

- Constant Declaration