7.4

Table Of Contents
endsearch()
show(&v1) %Show remaining text
Exit (procedure)
Exits from a for...endfor or repeat...until loop.
Syntax
exit()
Argument
None
Code Sample Example
This example shows how to break from a loop when a specific word, in this case Invoice,’ is found somewhere on the data
page.
define(&x,integer,1)
for(&x,1,1,&current.lpp)
if(pos('Invoice',@(&x,1,80))>0)
exit()
endif
endfor()
Condition Structures
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 )
©2010 Objectif Lune Inc - 402 -