Arbortext Command Language > Functions by Alphabetical Listing > defined
  
defined
defined(name)
This function returns 1 if the argument name is defined. This function may be used to test the existence of a scalar or array variable, array element, function or package name. For example:
defined($x) or defined("x")
returns 1 if x is a scalar or array variable,
defined("a[]")
returns 1 if a exists as an array variable,
defined($a[e1])
returns 1 if the expression (e1 in $a) is true,
defined("f()")
returns 1 if f is a defined function,
defined("p::")
returns 1 if p is a loaded package.
Variable and function names may be prefixed with a package name, for example,
defined(main::x)
defined("utils::f()")