BEE Script: clear var;
BEE Tag: <beeclear "var">
Clearing a variable means to remove the variable from the Context so that it will not be defined in the Context anymore. It is different from assigning a blank to it. An element containing a blank will still appear in, say, a "foreach" loop and be counted as an element in the sizeof ('#') operation, but a cleared element will not because it does not exist anymore.
You can clear the entire array by omitting the element part. You can even clear the entire class (except for system classes) by omitting both the name and element parts.
Example:
clear abc:xyz; // Clear value%abc:xyz
clear abc:; // Clear value%abc: (the default elemnent)
clear abc; // Clear value%abc (the entire array)
clear myclass%; // Clear myclass% (the entire class)
Not all variables can be cleared. Please see "System Classes" for details.
Please note that if the variable has more than one Reference to it, clearing one Reference does not remove the others. Please see "link" for more details.
|