Project

General

Profile

Unset » History » Version 5

Per Amundsen, 03/26/2021 09:42 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3 3 Per Amundsen
*/unset [-slg] <%var> [%var..]*
4 1 Per Amundsen
5
Unset local or global variables, local variables take precedence over a global variable with the same name.
6
7 2 Per Amundsen
[[Scripting_Wildcards|Wildcards]] is allowed.
8 1 Per Amundsen
9 5 Per Amundsen
_See also [[/var]], [[/set]], [[/inc]], [[/dec]], [[/vars]], [[$var]], [[Variables_Dialog|Edit Variables]]._
10 4 Per Amundsen
11 1 Per Amundsen
*Switches*
12
13
-s - Prints unset information.
14 3 Per Amundsen
-l - Unset local variable(s).
15
-g - Unset global variable(s).
16 1 Per Amundsen
17
*Parameters*
18
19
<%var> - Variable to unset.
20
[%var..] - Additional variables to unset.
21
22
*Example*
23
24
<pre>
25
alias example {
26
  ;Create and fill a variable with data.
27
  /set %var1 Variable test.
28
29
  ;Print the variable value.
30
  /echo -a %var1
31
32
  ;Unset the variable.
33
  unset %var1
34
35
  ;Print the variable value after unset.
36
  echo -a %var1
37
}
38
</pre>