Drop

Removes variables from memory.

Syntax:

Drop (var [,var...])

Parameters:

(s/a) var one or more variable names to remove, delimited by a comma.

Returns:

(i) always 1.

 

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 Drop 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.

Example:


a = "A variable"
b = "Another one"
Drop(a, b) ; This removes A and B from memory
Message("Drop","Dropped from memory.")
See Also:

DropWild, IsDefined