From the NannyMUD documentation

LAST CHANGE

2001-11-03

TOPIC

NAME

        preprocessor - About the NannyMUD preprocessor.

DESCRIPTION

	Preprocessing is done as the first pass of the compilation.
	The directives start with a # as the first character on a
	line. White space (SPACE or TAB characters) can appear after
	the initial # for proper indentation.
	
	#pragma strict_types
	    Turns on typechecking for the whole file and the types
	    of functions and variables must be declared.
	
	#pragma save_types
	    Saves type information which then can be used in inherited
	    objects.
	
	#define name token-string
	    Replace subsequent instances of name with token-string.
	 
	#define name(argument [, argument] ...  ) token-string
	    There can be no space between name and the `('.
	    Replace subsequent instances of name, followed by a
	    parenthesized list of arguments, with token-string,
	    where each occurrence of an argument in the token-
	    string is replaced by the corresponding token in the
	    comma-separated list.  When a macro with arguments is
	    expanded, the arguments are placed into the expanded
	    token-string unchanged. After the entire token-string
	    has been expanded, preprocessor re-starts its scan for
	    names to expand at the beginning of the newly created
	    token-string.
	
	#undef name
	    Remove any definition for the symbol name. No additional
	    tokens are permitted on the directive line after name.
	
	#include "filename"
	#include 
	    Read in the contents of filename at this location.
	    This data is processed as if it were part of the
	    current file. When the  notation is used,
	    filename is only searched for in the /include.
	 
	#line integer-constant "filename"
	    Generate line control information for the next pass of
	    the compiler. integer-constant is interpreted as the line
	    number of the next line and filename is interpreted as
	    the file from where it comes. If "filename" is not given,
	    the current filename is unchanged. No additional tokens
	    are permitted on the directive line after the optional
	    filename.
	 
	#if constant-expression
	    Subsequent lines up to the matching #else, #elif, or #endif
	    directive, appear in the output only if constant-expression
	    yields a nonzero value. All binary non-assignment LPC
	    operators, including `&&', `||', and `,', are legal in
	    constant-expression. The  `?:' operator, and the unary `-',
	    `!', and `~' operators, are also legal in constant-expression.
	 
	    The precedence of these operators is the same as that for
	    LPC. In addition, the unary operator defined, can be used
	    in constant-expression in these two forms: `defined ( name )'
	    or `defined name'. This allows the effect of #ifdef and
	    #ifndef directives (described below) in the #if directive.
	    Only these operators, integer constants, and names that are
	    known by the preprocessor should be used within
	    constant-expression. In particular, the size of operator is
	    not available.
	 
	#ifdef name
	    Subsequent lines up to the matching #else, #elif, or #endif
	    appear in the output only if name has been defined with a
	    #define directive, and in the absence of an intervening #undef
	    directive. Additional tokens after name on the directive line
	    will be silently ignored.
	 
	#ifndef name
	    Subsequent lines up to the matching #else, #elif, or #endif
	    appear in the output only if name has not been defined, or
	    if its definition has been removed with an #undef directive.
	    No additional tokens are permitted on the directive line after
	    name.
	 
	#else
	    This inverts the sense of the conditional directive
	    otherwise in effect. If the preceding conditional
	    would indicate that lines are to be included, then
	    lines between the #else and the matching #endif are
	    ignored. If the preceding conditional indicates that
	    lines would be ignored, subsequent lines are included
	    in the output. Conditional directives and correspond-
	    ing #else directives can be nested.
	 
	#endif
	    End a section of lines begun by one of the conditional
	    directives #if, #ifdef, or #ifndef. Each such direc-
	    tive must have a matching #endif.