| 149 | <h3>.enum</h3> |
| 150 | <p>Syntax: .enum [>STARTPOS,] SYMBOL,....</p> |
| 151 | <p>Simplify defining the enumerations. For every symbol, |
| 152 | define symbol with value of enumeration counter and increase an enumeration counter. |
| 153 | Defined symbols can not be assigned later. Optional STARTPOS sets enumeration counter |
| 154 | to STARTPOS value. Every scope has own enumeration counter. This features simplify |
| 155 | joining enumerations with scopes.</p> |
| 156 | <p>Examples:</p> |
| 157 | <p><code>.enum OK,BADFD,FATAL # define OK=0, BADFD=1, FATAL=2 |
| 158 | .enum >8, BitOne,BitTwo # define BitOne=8, BitTwo=9 |
| 159 | .enum HALO # define HALO=10 |
| 160 | .scope Result |
| 161 | # enum counter is zero in this scope |
| 162 | .enum NONE,FULL,INVALID # NONE=0, FULL=1, INVALID=2 |
| 163 | .ends</code></p> |