7.6

Table Of Contents
Arguments
expression1, expression2
Values of any type. Both expressions must be of the same type.
Code Sample Examples
Examples 1 and 2 illustrate both ways of comparing two expressions.
Example 1
if( gt(&current.line, 50) )
show('Bottom of page')
endif()
Example 2
if(&current.line > 50)
show('Bottom of page)
endif()
If (function)
Evaluates an expression and returns one of two specified values according to the results of the evaluation.
Syntax
if( expression, trueresult, falseresult ) any type
Arguments
expression
Boolean value. If it evaluates to true, the function returns the contents of trueresult, otherwise it returns the contents of falsere-
sult.
trueresult, falseresult
Values of any type, as long as both are of the same type. The return value of the function is therefore of the same type as
trueresult and falseresult.
Code Sample Example
This example changes the text to display according to the current value of a variable.
Example
©2010 Objectif Lune Inc - 553 -