bool = IsNil(var)
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
Trueif 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
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
See Data types for details.
Trueif the variable is