OpenMP-Examples/Examples_cond_comp.tex
2015-01-13 11:38:24 -08:00

22 lines
666 B
TeX

\pagebreak
\chapter{Conditional Compilation}
\label{chap: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}{1c}
\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}{1f}
\fortranspecificend