7.4

Table Of Contents
Argument
None
Code Sample Example
This example illustrates comments in PlanetPress Talk code.
define(&x,integer,1)
% Creates a new local variable named x that is an
% integer and has a value of 1. The variable is used
% in a loop
for(&x,1,1,10)
show(inttostr(&x))
endfor()
Graphics State
GRestore (procedure)
This command restores all system parameters previously saved with the gsave command. If no gsave command was issued
previously, the results are unpredictable. For more information, refer to the gsave command.
Syntax
grestore()
Argument
None
Code Sample Example
See "GSave (procedure)" (page 567).
GSave (procedure)
This command saves all current system parameters, which can later be restored using the grestore command. By bracketing
parts of your PlanetPress Talk programs with gsave/grestore commands, you can make sure the current system state is
preserved and remains unaffected by whatever operations your program executes. For instance, each PlanetPress object,
once converted to its PlanetPress Talk scripting language equivalent, begins with a gsave command and ends with a gre-
store, thus ensuring objects do not interfere with each other, or with the system.
The system parameters gsave saves include current line width, current stroke color, and current fill color.
Syntax
gsave()
©2010 Objectif Lune Inc - 567 -