!ATVAR() |
![]() ![]() ![]() |
The !ATVAR() subroutine retrieves the value of an @-variable.
Format
CALL !ATVAR(value, name)
where
The !ATVAR() subroutine returns the value of the named @-variable. Although intended for accessing user defined variables, it can also return the standard variables.
The !ATVAR() function sets the value returned by the STATUS() function. This will be zero if the specified variable is found, non-zero if it is not recognised.
Example
CALL !ATVAR(VALUE, "@USER1")
or
DEFFUN ATVAR(NAME) CALLING "!ATVAR" VALUE = ATVAR("@USER1")
Both of these examples retrieve the value of the @USER1 variable.
See the !SETVAR() subroutine for a way to set the value of an updateable @-variable. |