7.6

Table Of Contents
both in PlanetPress itself and when you use the Optimized PostScript Stream option. The behavior on printers (using the Printer
Centric option), on the other hand, remains unchanged.
Syntax
for( varname, startvalue, increment, stopvalue )
endfor()
Arguments
varname
Name of the variable to use for iterations. The variable must already exist.
startvalue
Integer value to initialize varname.
increment
Integer value used to increment varname after each iteration.
stopvalue
Integer value after which iterations stop.
Code Sample Example
This example simply prints 5 lines of text.
To cycle backwards through values, make startvalue larger than stopvalue, and specify a negative increment.
Example
define(&x,integer,1)
for(&x,1,1,5)
show('Line '+inttostr(&x))
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.
©2010 Objectif Lune Inc - 625 -