| |||
| Home > RealView Debugger Keywords > Alphabetical keyword reference > isalive | |||
Tests the status of the specified symbol.
int isalive (symbol_name)
symbol_name;
where:
symbol_nameThe variable name used for the symbol that isalive tests the scope of.
The isalive keyword tests whether the specified
symbol is in scope. It checks the status of the argument symbol_name,
to see whether that variable is in scope, and whether it can be
referenced. The value returned by isalive specifies
whether the variable does not exist, is not in scope, is in scope
inside the current active function, or is an external (global) variable,
or a static variable on the stack but out of scope.
intOne of the following values
-1Symbol does not exist.
0Symbol not currently active. It cannot be referenced because it is out of scope.
1Symbol currently active. It is part of the local procedure, also called an automatic variable.
2Available on the stack. The symbol is not part of local procedure, and is also called an external (active), global (active), or static automatic variable (inactive, but containing stored memory contents).
The argument of isalive must be a variable that has no return value. The argument cannot be a function.
You can use the following syntax for the isalive keyword when checking the status of a variable used in its argument.
CEXPRESSION isalive(xxx) /* Returns -1 if the symbol xxx does not exist. */ ADD var1 CE isalive(var1) /* Returns 1 since var1 is defined and active. */
The keywords CEXPRESSION and CE are equivalent.