Gri Commands
1: Introduction 2: Simple example 3: Fancy example 4: Running Gri 5: Programming Gri 6: General Issues 7: X-Y Plots 8: Contour Plots 9: Image Plots 10: Examples 11: Handling Data 12: Gri Commands 13: Gri Extras 14: Evolution of Gri 15: Installing Gri 16: Gri Bugs 17: System Tools 18: Acknowledgments 19: License 20: Newsgroup 21: Concept Index |
12.25: The `
|
new .variable_name. | \synonym_name \ [.variable_name. | \synonym_name \ [...]] |
delete
'ed, the new version is deleted, making
the old, unaltered, version accessible again.
This command is used mostly for temporary use, to prevent clashing with
existing values. Suppose you want to change the font size inside a new
command or an if block. Then you might do the following, where the
variable `.tmp.
' is used to store the old font size. Note that the
use of the `new/delete
' statements prevents the assignment to the
local version of the variable `.tmp.
' from affecting the value
known outside the `if
' block, if in fact `.tmp.
' happened to
exist outside the block.
set font size 10 draw label "This is in fontsize 10" at 10 2 cm if .want_title. new .tmp. .tmp. = ..fontsize.. set font size 22 draw label "This is 22 font" at 10 5 cm set font size .tmp. delete .tmp. end if draw label "This is 10 font" at 10 8 cm |