Directive (programming)
In computer science is meant by compiler directive ( or English. Compiler directive ) inserted into the source code control instructions for the compiler. The scope and the syntax of compiler directives are different from compiler to compiler and described in the compiler documentation.
Examples
C compilers use a C preprocessor that interprets compiler directives.
For example, # include
# pragma omp parallel for reduction ( : c )
for (int i = 0; i
In the Ada compiler directives are preceded by the keyword pragma.
Thus, for example,
with pragma OPTIMIZE (TIME );
the optimization program controlled.
The Haskell compiler GHC supports the setting of command line options in the source file using compiler directives.
An example is the activation of ghc- Haskell language extensions with the directive is requested { - - # OPTIONS_GHC - fglasgow - exts #}.