Type:
exists: objectName -> boolean
Call syntax:
exists(objectName)
Description:
The function exists returns TRUE if
an object named objectName is defined in the current workspace,
FALSE otherwise. This works also for internal functions
(with the exception of delete,
and exists)
which are treated like predefined variables, but not for
constants such as TRUE,
FALSE, 0, 1, etc.
Attention!
exists can be used to determine within a SALIERI program
whether or not an object is currently defined, without causing an error condition
to occur when its argument does not exist.
Error conditions:
An error condition occurs, when the argument objectName is not
a syntactically correct SALIERI variable identifier or a reserved
identifier. Reserved identifiers are names of infix operators,
constants, and the following function identifiers:
delete,
and exists.
Example:
> stat()
2 objects in workspace:
a text
356912 bytes of memory free
> exists(a)
Result= TRUE
> exists(god)
Result= FALSE
> exists(1+2)
Error in command-line: parse error
> exists(TRUE)
Error in command-line: parse error
> exists(write)
Result= TRUE
[Contents] ·
[Home] ·
[Mail]
© sic!systems, page frame designed by
hh;
this page has been automatically generated from the SALIERI
Documentation Database.