MACRO PRE-PROCESSOR Michael N. LeVine Naval Weapons Center Code 3511 China Lake Ca 93555 (619)939-2614 avn 437-2614 LEVINE%FIDLER.DECNET@NWC.NAVY.MIL Abstract This macro PRE-PROCESSOR is provided to allow the user to write code that can easily modified for multiple environments, conditions, etc simply by changing parameters at the beginning of his code. Capabilities included are: macros, conditional assembly, loops, automatic label generation, including other files, macro directive nesting, etc. A program written for the macro PRE-PROCESSOR consists of directive declarations and substitution operations. directives are to be on lines by themselves (no source code). Substitution operators can be almost anywhere. Two output files can be generated, a list file(.LIS) and a resulting source file (.SRC) . The following is a summary of directives, substitution operators and predefined variables: *COMMENT *ENDCOMMENT *MACRO(name) *ENDMACRO *DOMACRO(name)(arg1)(arg2)(arg3)(arg4)...(arg10) or *name(arg1)(arg2)(arg3)(arg4)...(arg10) *IF(expression) *ELSEIF(expression) *ELSE *ENDIF *SET(var=value/string/logical expression) *REPLACE(var=value/string/logical expression) *DEFAULT(var=value/string/logical expression) *DELETE(var) *REMOVE(var) *DO(idx=start expression,end expression[,increment expression]) *ENDDO *LIST(name) *ENDLIST *RESET(name) *MLIST(name,name,....name) *ENDMLIST *OPTION(option_var=value/string/logical) *END *EXIT *DUMP *INCLUDE(filename) *PAGE *ERROR('msg') *TRACEBACK *OPEN(expr,filename) *APPEND(expr,filename) *CLOSE(expr) *REDIRECT(expr) $varname$ $LABEL$ $LABEL0$ $LABEL1$ $LABEL2$ $LABEL3$ $LABEL4$ $LABEL5$ $LABEL6$ $LABEL7$ $LABEL8$ $LABEL9$ $INPUTLINE$ $DEF(varname)$ $TYPE(varname)$ $LENGTH(varname)$ DATE FILE TIME VMS=VMS (VAX/VMS only) or UNIX=IRIX (SGI IRIX ) VAX=VAX (VAX/VMS only) or SGI=SGI (SGI Irix) LANGUAGE=NONE or Language name