#if constant-expression Checks whether the constant expression is nonzero (true)
#ifdef identifier Checks whether the identifier is defined
#ifndef identifier Checks whether the identifier is undefined
#else Introduces source lines to be compiled as an alternative to the conditions tested by the previous directives
#elif constant-expression Delimits alternative source lines to be compiled if the constant expression in the corresponding #if, #ifdef, or #ifndef directive is false and if the additional constant expression presented in the #elif directive is true. An #elif directive is optional.
#endif Ends the scope of the previous directives
If the condition checked by #if, #ifdef, or #ifndef is true, then all lines between the #else, #elif, and #endif are ignored. If the condition is false, then any lines between the conditional directive and the #else or #elif (if any) are ignored. If there is no #else, then the lines between the conditional and the #endif are ignored.
#define
The #define preprocessor directive has the form:
#define identifier token-string
The preprocessor substitutes the token string everywhere in the program that it finds the identifier except within comments, character constants, or string constants.
Macro replacements are defined in a #define directive of the following form:
#define name([parm1[,parm2,...]]) token-string
Within the program, all macro references that have the following form are replaced by the token string. The arguments in the macro reference replace the corresponding parameters in the token string.
name([arg1[,arg2,...]])
#dictionary
The #dictionary directive extracts Common Data Dictionary (CDD)
definitions from the specified dictionary. These definitions are
then translated into VAX C and included in the program.
The #dictionary directive has the following form:
#dictionary "cdd_path"
The cdd_path is a character string that gives the path name of the CDD record. It can also be a macro that resolves to such a character string.
#include
The #include directive instructs the preprocessor to insert the
contents of the specified file or module into the program. An
#include directive can have one of three forms as follows:
#include "filespec" #include <filespec> #include module-name
Each form is interpreted differently by the compiler. For the quoted form, the order of search is as follows:
1. The directory containing the source file
2. The directories specified in the /INCLUDE qualifier (if any)
3. The directory or search list of directories specified in the logical name C$INCLUDE (if any)
For the bracketed form, the order of search is as follows:
1. The directories specified in the /INCLUDE qualifier (if any)
2. The directory or search list of directories specified in the logical name VAXC$INCLUDE (if any)
3. If VAXC$INCLUDE is not defined, then the directory or search list of directories specified by SYS$LIBRARY
In the first two forms, .H is the default file type.
There is no defined limit to the nesting level of #include files and modules.
#line
The #line directive applies a specified line number and file
specification to the next line of source text. This can be useful
for diagnostic messages. The #line directive has the following
forms:
#line constant identifier #line constant string # constant identifier # constant string
The constant gives the line number to be applied to the next line of source text in diagnostics reported to the terminal, not to the compiler listing file. It must be a nonsigned integer. The second argument supplies the file specification. It can be either a VAX C identifier or a character-string constant (not to exceed 255 characters).
#module
The #module directive passes information about an object module to
the compiler.
The #module directive can have one of three forms as follows:
#module identifier #module identifier identifier #module identifier string
The first argument of the directive is a VAX C identifier or macro that resolves to an identifier. It gives the system-recognized (for example, internally recognized by the debugger and the librarian) name of the module; the object file name remains the same. The second argument specifies the optional identification that appears on listings. This may be either a VAX C identifier, a character-string constant with no more than 31 characters, or a macro that resolves to one of these.
There can be only one #module directive per compilation. It can appear anywhere before the VAX C language text.
#pragma
The #pragma directive performs compiler-specific tasks as
designated by each particular implementation of the C language.
The forms of this pragma are as follows:
#pragma [no]builtins
Enables the VAX C built-in functions that directly access VAX instructions. If the pragma does not appear in your program, [no]builtins is the default.
#pragma ignore_dependency(id,id,...)
Specifies to the compiler that a variable that appears to be in conflict is safe to decompose.
#pragma [no]member_alignment
Tells VAX C to align structure members on the next boundary appropriate to the type of the member rather than the next byte. For example, a long variable is aligned on the next longword boundary; a short variable on the next word boundary.
#pragma safe_call (id,...)
Tells VAX C that a function does not contain any dependencies so it is safe to decompose.
#pragma sequential_loop
Tells VAX C not to decompose the specified loop.
#pragma standard
Tells VAX C to ignore the current setting of the /STANDARD=PORTABLE qualifier until the #pragma nostandard directive is encountered. The number of #pragma standard and #pragma nostandard directives in the compiled program (and in all included files) must be the same.
#undef
The #undef directive cancels a previously defined macro
replacement. Any other macro replacements that occurred prior to
the #undef directive remain.
The #undef directive has the following syntax:
#undef identifier