|
egofree
|
|
Reply #1 Posted on: June 21, 2014, 02:49:22 am |
|
|
Joined: Jun 2013
Posts: 601
|
Use Enumerations Enumerations
As in ISO C++, enumeration values are to be regarded as strict constants. When values are specified, they should be evaluable at the time of parse. A sample enumeration is as follows: enum { a, b, c, d = 10, e, f } In the above enumeration, as per ISO C++, the values of a, b, c, d, e and f are respectively 0, 1, 2, 10, 11, 12. These values should be assigned by the language-independent lexer upon initial parse. The assignment operand for initialized constants is to be regarded as a single token, though it may contain more complex expressions provided that these expressions do not entail runtime computations. As with EDL structures, EDL enumerations need not be followed by a semicolon, as declarations using the new type must be made separately.
Declarations of enumerations are currently not possible in scripts or objects, however you can include them in definitions, under ENIGMA settings. http://enigma-dev.org/docs/Wiki/ENIGMA:Specification
|
|
|
Logged
|
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #5 Posted on: June 21, 2014, 01:22:52 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
The parser in the other branch allows enums to be inline in EDL. The wiki page was written for that.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|
|