artefaktur
software engineer &        architecture

 
 
 
 

CfgScript Enum Type

| Any Type | Basic Types | Object Types | Array Types | Enum Type | Props Type |

An enum is a collection of integer types.



Enumeration
: 'enum' TypeName '{' (EnumValues)+ '}'
;

EnumValues
: EnumVal [ ',' EnumValues ]
;

EnumVal
: Identifier [ '='  Expression ]
;

Sample:

enum MyEnumValues
{
  FirstValue, // == 0
  SecondValue, // == 1
  ThirdValue = 10,
  NextValue, // == 11
  LastValue = NextValue + ThirdValue 
}
 
Last modified 2005-05-08 18:21 by SYSTEM By Artefaktur, Ing. Bureau Kommer