@BeginModule
@NewPage
@Name      = Condc
@Title     = Conditional select a constant
@Section   = Conditional selection
@Arguments = ifile ofile
@Operators = ifthenc ifnotthenc

@BeginDescription
This module creates fields with a constant value or missing value.
The fields in @file{ifile} are handled as a mask. A value not equal 
to zero is treated as "true", zero is treated as "false".
@EndDescription
@EndModule


@BeginOperator_ifthenc
@Title     = If then constant
@Parameter = c

@BeginDescription
@IfMan
         / c      if i(t,x) NE 0  AND  i(t,x) NE miss
o(t,x) =
         \ miss   if i(t,x) EQ 0  OR   i(t,x) EQ miss
@EndifMan
@IfDoc
@BeginMath
o(t,x) = \left\{
\begin{array}{cll}
\mbox{c}    & \mbox{if} \;\;  i(t,x) \neq 0 & \wedge \;\; i(t,x) \neq \mbox{miss} \\
\mbox{miss} & \mbox{if} \;\;  i(t,x)    = 0 & \vee   \;\; i(t,x)    = \mbox{miss} \\
\end{array}   \right.
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_ifnotthenc
@Title     = If not then constant
@Parameter = c

@BeginDescription
@IfMan
         / c      if i(t,x) EQ 0  AND  i(t,x) NE miss
o(t,x) =
         \ miss   if i(t,x) NE 0  OR   i(t,x) EQ miss
@EndifMan
@IfDoc
@BeginMath
o(t,x) = \left\{
\begin{array}{cll}
\mbox{c}    & \mbox{if} \;\;  i(t,x)    = 0 & \wedge \;\; i(t,x) \neq \mbox{miss} \\
\mbox{miss} & \mbox{if} \;\;  i(t,x) \neq 0 & \vee   \;\; i(t,x)    = \mbox{miss} \\
\end{array}   \right.
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginParameter
@Item = c
FLOAT  Constant
@EndParameter


@BeginExample
To create fields with the constant value 7 if the corresponding field element
of @file{ifile} is greater than 0 use:
@BeginVerbatim
   cdo ifthenc,7 ifile ofile
@EndVerbatim
@EndExample
