Determine whether or not a variable has a value
Integer_Type __is_initialized (Ref_Type r)
This function returns non-zero of the object referenced by r
is initialized, i.e., whether it has a value. It returns 0 if the
referenced object has not been initialized.
For example, the function:
define zero ()
{
variable f;
return __is_initialized (&f);
}
will always return zero, but
define one ()
{
variable f = 0;
return __is_initialized (&f);
}
will return one.
It is easy to see why a reference to the variable must be passed to
__is_initialized and not the variable itself; otherwise, the
value of the variable would be passed and the variable may have no
value if it was not initialized.
- slangrtl
-
__class_id,
__class_type,
__eqs,
__get_defined_symbols,
__get_reference,
__pop_args,
__push_args,
__uninitialize,
_apropos,
_function_name,
_nargs,
_typeof,
array_info,
dup,
eval,
evalfile,
getenv,
is_defined,
is_struct_type,
length,
make_printable_string,
typecast,
typeof
|