7.6

Table Of Contents
Code Sample Example
In this example, the current position is set first and saved.
gsave and grestore do not have to be issued in pairs. Issuing two consecutive gsave commands without a call to grestore
simply replaces the previously saved parameters on the stack, while issuing two grestore commands simply restores the
same stack of parameters twice.
Example
moveto( 1, 1 )
%Position is now 1,1
gsave()
%Save current state
lineto( 2, 1 )
%Position is now 2,1
lineto( 2, 2 )
%Position is now 2,2
grestore()
%Restore previous state: position is now 1,1
GT (function)
Compares two expressions of any type and returns true if the first is greater than the second, false otherwise. This is the func-
tional equivalent to the > operator.
Syntax
gt( expression1, expression2 ) Boolean value
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()
©2010 Objectif Lune Inc - 289 -