The information in this article applies to:
SUMMARY
You can conditionally compile metacommands in FORTRAN source code. However,
you cannot use the /4cc compiler option switch to do so because the
metacommand requires its dollar sign ($) in the first column of the source
line while the /4cc switch requires a character specifier as the first
character of the source line.
MORE INFORMATIONThe following code example demonstrates conditionally compiling code that includes metacommands. Sample Code
If the line "$DEFINE L" precedes this $IF block, the compiler includes
the LARGE.INC file, otherwise the compiler includes the MEDIUM.INC
file. This method provides the ability to hard code conditional
changes.
To choose the version to compile from the command line, specify the /D compiler option switch to define the variable used in the $IF block. The /D option switch eliminates the need for the $DEFINE metacommand. In the previous example, to include the LARGE.INC file, use a compiler command line such as the following:
Additional query words: kbinf 5.00 5.10 1.00 4.00
Keywords : kbFortranPS kbLangFortran |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |