7.4

Table Of Contents
crlf()
endfor()
If ElseIf… EndIf (procedure)
This command structure can define up to two conditional blocks. Statements nested within the first block are executed only if
the condition specified in the if statement returns true. If it returns false, the program branches to the first statement in the sec-
ond block, if one has been defined using the elseif statement. Otherwise, control flows to the first statement following the endif
command.
With PlanetPress Suite version 7.0, the elseif statement has been optimized to evaluate an argument, exactly like an if state-
ment, and elseif statements from other programming languages. In order to complete the if...elseif...endif command struc-
ture, however, an else statement was also added, acting exactly like the previous, empty elseif. Note that the use of the else
statement is strongly recommended, as it is optimized by comparison to the elseif statement. Also note that documents
created with previous versions and using the if...elseif...endif structure will not be updated, for full backward compatibility.
Syntaxes
Prior to version 7.0
if( condition )
elseif()
endif()
Version 7.0 and above
if( condition1 )
...
elseif( condition2 )
...
else()
...
endif()
Argument
condition, condition1, condition2
Value of type Boolean to evaluate.
Code Sample Example
This example simply prints 5 lines of text, selecting fonts according to line numbers.
Example prior to version 7.0
define(&x,integer,1)
©2010 Objectif Lune Inc - 627 -