exists

Test for the existance of a variable.

Syntax

status = exists ( variable ) ;

Arguments

list variable

Return Value

boolean status

Warnings

%UNDEFINED : The variable does not exist.

Exceptions

%ARGUMENT : Invalid arguments. Usage: status = exists ( variable ) ;

%IDENTIFIER : 'variable' argument is not a valid identifier, literal, or reference

Description

Hyperscript variables can be defined and undefined on-the-fly, therefore it is often necessary to test for the existance of a variable. If the scope is local, the exists() function first tests for the existance of a a local definition of the variable before testing for a global definition.

Examples

To execute the example below, press or modify the example to try different variations.

Related Links

undef