Cond.pm
NAME
Communiware::DE::Cond - Dynamic element Cond
SYNTAX
<:Cond:> <:Case ... :> <:EndCase:> <:Case ... :> <:EndCase:> <:EndCond:>
DESCRIPTION
Dynamic element Cond performs multiple branching.
All Case dynamic elements which are contained inside Cond are evaluated in sequentual order.
If logical expression which is parameter of Case, evaluates to truth, contents of this <:Case:>...<:EndCase:> block is processed and processing of Cond terminates.
See Communiware::Expr documentation for logical expression syntax.
Anything but <:Case:> dynamic elements and HTML comments which occur inside <:Cond:> but outside <:Case:> is considered an error.
When converting from If to Cond, note, that in difference to If, Cond does not perform any special processing of first operand. So, you should use substituted values rather than attribute names.
It is common practice to use always-true condition for last Case in Cond. Common idiom is <:Case otherwise:> or <:Case default:>. String constants ``otherwise'' and ``default'' are truth when used alone as logical expressions, as well any other non-empty string.