IF(4)

Table of Contents

Name

if conditional construct

Synopsis

%if C-expression
%then template-stuff
[ %elif C-expression %then template-stuff ] ... [ %else template-stuff ]
%end-if

Description

The if template construct provides conditional branching within template and proc sections. The if C-expression is evaluated. If the value is TRUE then the template-stuff following the then keyword is generated to the product. If the value is FALSE then following branches, if any, are checked. If there are any elif branches, their Cexpressions are evaluated until one is TRUE; the
corresponding template-stuff is then generated to the product. If no C-expressions are TRUE then the templatestuff in the else branch, if any, is generated to the product.

Example

%if a==3 %then three %end-if

%if a==4 && b==c
%then a is four and b is c
%elif a==b && c==4
%then a is b and c is four
%else neither of the conditions hold
%end-if

See Also

CASE(4)
WHILE(4)
FOR(4)
FORALL(4)


© 1990 Lucent Technologies, Inc
© 1998 Harmony Software, Inc