-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Commands: ENUM_LIST, DEFINE, and END_ENUM_LIST Descrtiption: Altogether, these commands can be used to enumerate symbol replacements for lists of symbols. DEFINE outside of an ENUM/ENUM_LIST block can be used to define individual symbolic replacements, and to define "flags". (However, there is no UNDEFINE. Sorry.) Parmeters: ENUM_LIST and END_ENUM_LIST take no parameters. DEFINE supports several syntaxes: DEFINE symbol If outside an enum list, defines a symbolic replacement named symbol as |CI1 (to be used with #IFDEF compiler directive). DEFINE symbol1 symbol2 ... If within an enum list, defines a symbolic replacement named symbol1 as a constant integer one greater than the previous symbolic replacement in the enum list (and symbol2 and each additional parameter are defined one greater than the symbol before it). DEFINE symbol FOR originalSymbol If outside an enum list, defines a symbolic replacement named symbol for originalSymbol. In this instance, originalSymbol may be any valid symbol name or constant value. DEFINE symbol FOR constInt If within an enum list, defines a symbolic replacement named symbol for the constant integer constInt. Only constant integers can be used for constInt with the AS syntax option within enum lists. Examples: enumeration_list define ddd // starts at 0 by default define eee // 1 define fff ggg hhh // 2 3 4 end_enumeration_list enum_list define rrr for 5 // start at 5 define sss // 6 define ttt for 21 // jump to 21 define uuu // 22 end_enum_list define aaa for ttt // generic symbolic replacements define aaa for "Hello" define zzz // defines zzz as |CI1 (to be used with #IFDEF) Note: Defining multiple "flags" (define sss ttt) is not allowed in order to allow proper type-checking. (The compiler's preprocessor substitutes the symbols too early; therefore, it becomes impossible to differentiate the allowable syntaxes if multiple arguments are allowed.) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#IF (!Zs=1) #ERROR DFERR_COMP_ILLEGAL_CODE_PLACEMENT ENUMERATION LISTS CANNOT BE BE NESTED #ENDIF #SET ZS$ 1 // enum_flag #SET ZT$ 0 // initial enum_value