D 2018-06-24T03:02:18.232 L Preprocessor P a51408f9ca7152f8ea21fdd8db64cdf1cd8716f1 U zzo38 W 4550 Preprocessor commands are put in braces. Put a left brace, and then the macro name, and then the arguments (if any), and then a right brace. Macros are expanded (sometimes with side-effects) outside of any braces, as well as inside braces where a number or string is expected, but are not expanded as part of the definition or arguments to a user-defined macro. Other tokens used in the preprocessor are a macro separator token, which is written by a vertical bar, and a macro argument token, which is written as one or more backslashes followed by a number from 1 to 255. The purpose of these are explained below. Built-in macros include: * {+}: Takes any number of arguments, all numbers, which are added together. With no arguments, the result is 0. * {-}: Takes two arguments, both numbers; the result is the first minus the second. * {*}: Takes any number of arguments, all numbers, which are multiplied together. With no arguments, the result is 1. * {/}: Takes two arguments, both numbers; the result is the first divided by second (using rounding like in C). * {mod}: Takes two arguments, both numbers; the result is the remainder of first divided by second (using rounding like in C). * {band}: Takes any number of arguments, all numbers, which are bitwise ANDed together. With no arguments, the result is -1. * {bor}: Takes any number of arguments, all numbers, which are bitwise ORed together. With no arguments, the result is zero. * {bxor}: Takes any number of arguments, all numbers, which are bitwise XORed together. With no arguments, the result is zero. * {bnot}: Takes one argument, which is a number. The result is the bitwise complement of that number. * {bit}: Takes any number of arguments, all of which are numbers in range 0 to 31. The result is a number with only the corresponding bits set. * {cat}: Takes any number of arguments, which can include name tokens, string tokens, numeric tokens, and macro separator tokens. Macro separator tokens are ignored; the rest are concatenated into a single string. Any sigils in a name token are omitted. Numeric tokens are converted to decimal (even if originally written in hexadecimal or octal). * {version}: Takes one argument, which must be zero, otherwise it is an error. The expansion is nothing. Later versions of Free Hero Mesh may change the valid range of numbers. * {define}: Define your own macros (or redefine an existing macro; even built-in macros can be redefined). The expansion is nothing, but defines a macro as a side-effect; see the section below for details. * {include}: Takes one argument, which is a string. Causes it to read that file (like the #include command in the C preprocessor). Cannot be used inside of another macro. * {call}: The first argument is a string that specifies the name of the macro; the rest is the arguments to that macro. It will call that macro; this can be used if the name of the macro to call must be given dynamically. Both built-in macros and user-defined macros can be called in this way.