Next: delete, Previous: default, Up: Internal Routines [Contents][Index]
defined(var [, /target])
defined(var)
returns 0
if var
has no
value (i.e., is of data class undefined
) or, when
var
is a pointer (Pointers), if the ultimate target
of var
is undefined (class #class.undefined
), and
1
otherwise.
Keyword /target
has influence only if x
is a pointer
or a parameter to a user-defined subroutine or function. If
x
is a pointer, then defined(x, /target)
yields 1
if the pointer has a target (even if that target is ultimately
linked to an undefined value), and 0
otherwise.
If x
is a parameter to a user-defined subroutine or function, then
defined(x, /target)
yields 1
if the user specified an
argument for this parameter, even if this argument is itself an
undefined variable, and 0
otherwise. This property is inherited if the
parameter is used as an argument to another user-defined subroutine or
function (Arguments).