[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.31 undefine
Clear one or more previously defined user variables. This is useful in order to reset the state of a script containing an initialization test.
A variable name can contain the wildcard character ‘*‘ as last character. If the wildcard character is found, all variables with names that begin with the prefix preceding the wildcard will be removed. This is useful to remove several variables sharing a common prefix. Note that the wildcard character is only allowed at the end of the variable name! Specifying the wildcard character as sole argument to undefine has no effect.
Example:
undefine foo foo1 foo2 if (!exists("foo")) load "initialize.gp"
bar = 1; bar1 = 2; bar2 = 3 undefine bar* # removes all three variables
This document was generated on November 1, 2013 using texi2html 5.0.