Enumerations: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,172: | Line 1,172: | ||
#Constant_A ; 10241 |
#Constant_A ; 10241 |
||
#Constant_B ; 10242 |
#Constant_B ; 10242 |
||
EndEnumeration</lang> |
|||
Enumeration groups can also be named to allow continuation where a previous named group left off. |
|||
<lang PureBasic>;This starts the enumeration of a named group 'NamedGroup'. |
|||
Enumeration NamedGroup 5 |
|||
#Green ; 5 |
|||
#Orange ; 6 |
|||
EndEnumeration |
|||
;EnumerationBinary will use values that are a double of the previous value (or starting value). |
|||
EnumerationBinary |
|||
#North ; 1 |
|||
#West ; 2 |
|||
#South ; 4 |
|||
#East ; 8 |
|||
EndEnumeration |
|||
;This continues the enumeration of the previously named group 'NamedGroup'. |
|||
Enumeration NamedGroup |
|||
#Yellow ; 7 |
|||
#Red ; 8 |
|||
EndEnumeration</lang> |
EndEnumeration</lang> |
||