SetGlobal (Subsystem subroutine): Difference between revisions
Jump to navigation
Jump to search
m (Automatically generated page update) |
m (copied content from PDF and updated to be subsystem only) |
||
Line 1: | Line 1: | ||
{{Template:Subsystem:SetGlobal subtitle}} | {{Template:Subsystem:SetGlobal subtitle}} | ||
The <var>SetGlobal</var> shared subroutine sets a <var>[[Subsystem_class|Subsystem]]</var> global. | |||
==Syntax== | ==Syntax== | ||
Line 5: | Line 6: | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>(Subsystem)</th> | <tr><th>%(Subsystem)</th> | ||
<td>The class name in parentheses denotes a shared method. SetGlobal can also be invoked via a Subsystem object variable, which may be null.</td></tr> | <td>The class name in parentheses denotes a shared method. <var>SetGlobal</var> can also be invoked via a <var>Subsystem</var> object variable, which may be null.</td></tr> | ||
<tr><th> | <tr><th>name</th> | ||
<td> | <td>A string that identifies the global to be set.</td></tr> | ||
<tr><th> | <tr><th>value</th> | ||
<td> | <td>A string that identifies the new value for the global.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
= | <ul><li>All errors result in request cancellation. | ||
<li>It is not an error to set a global that is not set. | |||
<li>The <var>Subsystem</var> class <var>SetGlobal</var> sets the global for the current <var>subsystem</var> context (indicated by <var>[[Context_(Subsystem_property)|%(subsystem):Context]]</var>). | |||
<li>Like <var>[[$Setg_Subsys]]</var>, the <var>SetGlobal</var> method momentarily turns off multi-processing, so should not be used heavily in an <var class="product">MP/204</var> environment. | |||
</ul> | |||
==See also== | ==See also== | ||
<ul><li>The <var>setGlobal</var> method, in the <var>Subsystem</var> class, performs a function identical to the <var>$setg_subsys</var> function. That is, the following two statements are identical: | |||
<p class="code">%(subsystem):setGlobal('PHLEGMATIC', 'STOLID') | |||
%setg_subsys('PHLEGMATIC', 'STOLID')</p> | |||
<li>For more information about subsystem globals, see [[Subsystem_class#System_and_subsystem_globals_and_strings|“Subsystem globals and strings”]].</ul> | |||
{{Template:Subsystem:SetGlobal footer}} | {{Template:Subsystem:SetGlobal footer}} |
Revision as of 11:27, 24 March 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 %(subsystem):Context).
- Like $Setg_Subsys, the SetGlobal method momentarily turns off multi-processing, so should not be used heavily in an MP/204 environment.
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 “Subsystem globals and strings”.