SetGlobal (Subsystem subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
m (Needs an output variable too.)
 
(2 intermediate revisions by 2 users not shown)
Line 23: Line 23:
<li>It is not an error to set a global that is not set.
<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)|Context]]</var>).
<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)|Context]]</var>).


<li>Like <var>[[$Setg_Subsys]]</var>, <var>SetGlobal</var> momentarily turns off multi-processing, so should not be used heavily in an <var class="product">MP/204</var> environment.  <var>[[SetString_(Subsystem_function)|SetString]]</var> does not suffer this limitation and should be used in these situations.
<li>Like <var>[[$Setg_Subsys]]</var>, <var>SetGlobal</var> momentarily turns off multi-processing, so should not be used heavily in an <var class="product">MP/204</var> environment.  <var>[[SetString (Subsystem function)|SetString]]</var> does not suffer this limitation and should be used in these situations.
</ul>
</ul>


==See also==
==See also==
<ul>
<ul>
<li>The <var>setGlobal</var> method, in the <var>Subsystem</var> class, performs a function identical to the <var>[[$Setg_Subsys|$setg_subsys]]</var> function. That is, the following two statements are identical:
<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')
<p class="code">%(subsystem):setGlobal('PHLEGMATIC', 'STOLID')
%setg_subsys('PHLEGMATIC', 'STOLID')</p>
%rc = $Setg_Subsys('PHLEGMATIC', 'STOLID')</p>


<li>For more information about subsystem  globals, see [[Subsystem_class#System_and_subsystem_globals_and_strings|"System and Subsystem globals and strings"]].</ul>
<li>For more information about subsystem  globals, see [[Subsystem class#System and subsystem globals and strings|System and Subsystem globals and strings]].</ul>
{{Template:Subsystem:SetGlobal footer}}
{{Template:Subsystem:SetGlobal footer}}

Latest revision as of 23:18, 22 October 2015

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') %rc = $Setg_Subsys('PHLEGMATIC', 'STOLID')

  • For more information about subsystem globals, see System and Subsystem globals and strings.