ProvideX V8.20 > Language Reference > 2. Directives
116
END_IF Directive
End IF Directive
Formats
1. End IF Before Line Ends: IF expression THEN ... ELSE ... END_IF ...
2. End IF using FI: IF expression THEN ... ELSE ... FI ...
Where:
expression
Condition to control processing.
...
Directives, processing.
Note: FI is an accepted substitute for END_IF. Refer to the IF..THEN..ELSE directive
for complete syntax.
Description
Use END_IF (or FI) to terminate an IF directive before the end of a statement or line.
When an END_IF directive follows an IF directive, execution resumes immediately
after the END_IF directive, regardless of whether the condition was found to be true
or false.
See Also
IF..THEN..ELSE Test Condition, p.156.
Example
00100
PRINT "The customer has ",
00200
IF bal<=0 \
THEN PRINT "NO", \
ELSE PRINT "$",bal, \
END_IF ;
PRINT " credit available"
->BAL=0
->RUN
The customer has NO credit available.
->BAL=1.98
->RUN
The customer has $ 1.98 credit available