|GSAK (Geocaching Swiss Army Knife)|
RemoveVar(sVarName) : Boolean
RemoveVar() allows you to remove any GSAK variable. It would probably be used mainly with the persistent variables, but there is no reason why you can't use it with normal variables as well if you find a need. The variable name should be entered without the preceding $ symbol. This removes the conflict that can occur when using variable substitution. Also see the complimentary VarExists() function.
Wildcards are also supported, to remove multiple variable names:
* = match any sub string (use a single * to delete all user variables)
? = match any single character
# = match any numeric character (0..9)
@ = match any alpha character (A..Z, a..z)
~ = match any non-alphanumeric, non-space character
Note: This function returns a boolean value so you can determine if the variable was actually found to remove. Regardless, after this function is run you can be sure the variable with that name is no longer defined in the macro.
Warning: Removing and recreating variables is very resource hungry (read time consuming) in the raw macro engine. This is not something I would recommend doing continuously (in a loop for example).
Alpha List Category List
Copyright 2004-2016 CWE Computer Services |