SetGlobal (Subsystem subroutine): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
Line 7: | Line 7: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th><var>%(Subsystem)</var></th> | <tr><th><var>%(Subsystem)</var></th> | ||
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods | <td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. <var>SetGlobal</var> can also be invoked via a <var>Subsystem</var> object variable, which may be <var>null</var>.</td></tr> | ||
<tr><th>name</th> | <tr><th>name</th> | ||
<td>A string that identifies the global to be set.</td></tr> | <td>A string that identifies the global to be set.</td></tr> | ||
Line 25: | Line 25: | ||
<p class="code">%(subsystem):setGlobal('PHLEGMATIC', 'STOLID') | <p class="code">%(subsystem):setGlobal('PHLEGMATIC', 'STOLID') | ||
%setg_subsys('PHLEGMATIC', 'STOLID')</p> | %setg_subsys('PHLEGMATIC', 'STOLID')</p> | ||
<li>For more information about subsystem globals, see [[Subsystem_class#System_and_subsystem_globals_and_strings|&amp;amp;amp;#x201C;Subsystem globals and strings&amp;amp;amp;#x201D;]].</ul> | <li>For more information about subsystem globals, see [[Subsystem_class#System_and_subsystem_globals_and_strings|&amp;amp;amp;amp;#x201C;Subsystem globals and strings&amp;amp;amp;amp;#x201D;]].</ul> | ||
{{Template:Subsystem:SetGlobal footer}} | {{Template:Subsystem:SetGlobal footer}} |
Revision as of 18:28, 30 November 2011
Set a subsystem global (Subsystem class)
The SetGlobal shared subroutine sets a Subsystem global.
Syntax
%(Subsystem):SetGlobal( name, value)
Syntax terms
%(Subsystem) | The class name in parentheses denotes a shared method. SetGlobal can also be invoked via a Subsystem 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.
- The Subsystem class SetGlobal sets the global for the current subsystem context (indicated by Context).
- Like $Setg_Subsys, SetGlobal 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.
See also
- The setGlobal method, in the Subsystem class, performs a function identical to the $setg_subsys function. That is, the following two statements are identical:
%(subsystem):setGlobal('PHLEGMATIC', 'STOLID') %setg_subsys('PHLEGMATIC', 'STOLID')
- For more information about subsystem globals, see &amp;amp;amp;#x201C;Subsystem globals and strings&amp;amp;amp;#x201D;.