OpenMP-Examples/Examples_cond_comp.tex

22 lines
663 B
TeX

\pagebreak
\section{Conditional Compilation}
\label{sec:cond_comp}
\ccppspecificstart
The following example illustrates the use of conditional compilation using the
OpenMP macro \code{\_OPENMP}. With OpenMP compilation, the \code{\_OPENMP}
macro becomes defined.
\cnexample{cond_comp}{1}
\ccppspecificend
\fortranspecificstart
The following example illustrates the use of the conditional compilation sentinel.
With OpenMP compilation, the conditional compilation sentinel \code{!\$} is recognized
and treated as two spaces. In fixed form source, statements guarded by the sentinel
must start after column 6.
\fnexample{cond_comp}{1}
\fortranspecificend