IsNil -- check if a variable is Nil (V6.0)
bool = IsNil(var)
This function checks if the specified variable is Nil. Along with GetType() IsNil() is the only reliable way to find out if a variable is Nil or not. Checking the variable against the Nil identifier is not reliable because this will also result in True if the variable is zero instead of Nil. Example:

a = 0
b = Nil
DebugPrint(IsNil(a), a = Nil)  ; prints "0 1"
DebugPrint(IsNil(b), b = Nil)  ; prints "1 1"

You see that "a = Nil" returns True although a is zero and not Nil. That is because Nil is always regarded as zero when used in expressions. Thus, if you want to find out whether a variable really is Nil, always use IsNil() or GetType().

See Data types for details.

variable to examine
True if the variable is Nil, False otherwise

Show TOC