mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-04 05:41:33 +01:00
22 lines
666 B
TeX
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
|
|
|