!SETVAR() |
![]() ![]() ![]() |
The !SETVAR() subroutine sets the value of a user defined @-variable. It can also update some standard @variables.
Format
CALL !SETVAR(name, value)
where
The !SETVAR() subroutine sets the value of the named user defined @-variable. It can also set other standard @variables that are not read-only (e.g. @USER0) though these can be set using simple assignment statements.
The !SETVAR() function sets a status value that can be retrieved using the STATUS() function. This will be zero if the action is successful, or a non-zero error code if the name is invalid.
Example
CALL !SETVAR("@MYVAR", 71)
This example sets the user defined @MYVAR to 71.
See the !ATVAR() subroutine for a way to retrieve the value of a user defined @-variable. |