SetGlobal (System subroutine)
Jump to navigation
Jump to search
Set a system-wide global (System class)
The SetGlobal shared subroutine sets a system-wide global.
Syntax
%(System):SetGlobal( name, value)
Syntax terms
%(System) | The class name in parentheses denotes a shared method. SetGlobal can also be invoked via a System object variable, which may be Null. |
---|---|
name | A string that identifies the global to be set. |
value | A string that identifies the new value for the global. |
Usage notes
- All errors result in request cancellation.
- It is not an error to set a global that is not set.
- Like $Setg_Sys, the SetGlobal method momentarily turns off multi-processing, so should not be used heavily in an MP/204 environment. SetString does not suffer this limitation and should be used in these situations.
Examples
The following statement sets the system global called CHOLERIC
:
%(system):setGlobal('CHOLERIC', 'ANGRY')
See also
- The setGlobal method, in the System class, performs a function identical to the $setg_sys function. That is, the following two statements are identical:
%(system):setGlobal('PHLEGMATIC', 'STOLID') %rc = $setg_sys('PHLEGMATIC', 'STOLID')
- For more information about system globals, see "System and SubSystem globals and strings".