DropWild

Removes variables from memory.

Syntax:

DropWild ( variable/wildcard )

Parameters:

(s/a) variable/wildcard: variable or wildcarded variable.

Returns:

(i) number of items dropped.

 

Note: a wildcarded variable does not recognize a wildcard at the beginning of the variable name. DropWild only accepts a wildcard on the end of the variable name, i.e. "var*".

This function removes variables from the WIL Interpreter's variable list, and recovers the memory associated with the variable (and possibly related string storage).

A variable is defined the first time it appears to the left of an equal sign in a statement. It stays defined until it is explicitly dropped with the DropWild function, or until the current invocation of the WIL Interpreter gets closed.

Generally speaking: in batch file-based implementations of WIL, all variables are dropped automatically at the end of every batch file; and in menu-based implementations of WIL, variables stay defined until explicitly dropped.

Drop and DropWild can accept array names as parameters.

Note: WIL is limited to 2000 variables.

Warning: Do not attempt to use the wildcard "*". This causes unpredictable results.

Example:


a1= "A variable"
a2= "Another variable"
DropWild("a*") ; This removes A1 and A2 from memory
Message("DropWild","Dropped from memory.")
See Also:

IsDefined, Drop