OpenMP-Examples/directives/fixed_format_comments.tex
2024-04-16 08:59:23 -07:00

21 lines
1005 B
TeX

%\pagebreak
\section{Fortran Comments (Fixed Source Form)}
\label{sec:fortran_fixed_format_comments}
\index{directive syntax!fixed form, Fortran}
\index{fixed form syntax, Fortran}
OpenMP directives in Fortran codes with fixed source form are specified as comments with one of the
\scode{!$omp}, \scode{c$omp}, and \scode{*$omp} sentinels, followed by a
directive name, and required and optional clauses. The sentinel must begin in column 1.
In the example below the first directive (DIR 1) specifies the %parallel work-sharing
\kcode{parallel do} combined directive, with a \kcode{num_threads} clause, and a comment.
The second directive (DIR 2) shows the same directive split
across two lines. The next nested directives (DIR 3 and 4) show the previous combined directive as
two separate directives.
Here, an \kcode{end} directive (\kcode{end parallel}) must be specified to demarcate the range (region)
of the \kcode{parallel} directive.
\fexample{directive_syntax_F_fixed_comment}{1}
\clearpage