$Delg Subsys: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 2: Line 2:
<span class="pageSubtitle">Delete subsystem-wide global</span>
<span class="pageSubtitle">Delete subsystem-wide global</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Delg_Subsys function is the [[DeleteGlobal (Subsystem subroutine)]].</p>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the <var>$Delg_Subsys</var> function is the [[DeleteGlobal (Subsystem subroutine)]].</p>


This function allows a user to delete a <var class="product">Model 204</var> "global variable" which has a subsystem-wide scope. Doing this will let the value of the $GETG function or dummy string ("?&amp;amp.") substitution for the variable default to the current system-wide or user global variable with the same name (depending on the scope search order). The order in which the different scopes of global variables are searched can be controlled using [[$SirParm]] parameters: for $GETG, with 'GETGSYS', and for dummy strings, with 'DUMMYSYS'.  
This function allows a user to delete a <var class="product">Model 204</var> "global variable" which has a subsystem-wide scope. Doing this will let the value of the $GETG function or dummy string ("?&amp;amp.") substitution for the variable default to the current system-wide or user global variable with the same name (depending on the scope search order). The order in which the different scopes of global variables are searched can be controlled using [[$SirParm]] parameters: for $GETG, with 'GETGSYS', and for dummy strings, with 'DUMMYSYS'.  


The $Delg_Subsys function accepts two arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.  
The <var>$Delg_Subsys</var> function accepts two arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.  


The first argument is the name of the global variable to be deleted. This is an optional parameter; it defaults to the null string.  
The first argument is the name of the global variable to be deleted. This is an optional parameter; it defaults to the null string.  

Revision as of 20:17, 19 October 2012

Delete subsystem-wide global

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Delg_Subsys function is the DeleteGlobal (Subsystem subroutine).

This function allows a user to delete a Model 204 "global variable" which has a subsystem-wide scope. Doing this will let the value of the $GETG function or dummy string ("?&amp.") substitution for the variable default to the current system-wide or user global variable with the same name (depending on the scope search order). The order in which the different scopes of global variables are searched can be controlled using $SirParm parameters: for $GETG, with 'GETGSYS', and for dummy strings, with 'DUMMYSYS'.

The $Delg_Subsys function accepts two arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.

The first argument is the name of the global variable to be deleted. This is an optional parameter; it defaults to the null string.

The second argument is the name of the subsystem that the variable is associated with. This is an optional argument if the $function is invoked from within a subsystem; it defaults to the null string. A non-null subsystem name is required if the $function is invoked from outside a subsystem. If invoked from a subsystem and the second argument is null, the name of the subsystem is used.

System administrator privileges are required to invoke this $function, unless the second argument is omitted or is the null string, and the $function is invoked from a precompiled procedure; in that case, no privileges are required, and the subsystem name used is the active subsystem.

Syntax

<section begin="syntax" />%rc = $Delg_Subsys(glob_name, subsys_name) <section end="syntax" />

$Delg_Subsys Function

%RC is set to 0 or to an error indicator.

0 - No errors 1 - Not system administrator 3 - Subsystem name missing

$Delg_Subsys return codes

Retrieval of subsystem global variables is highly efficient; updates, however, are not, so use this $function appropriately.

For an explanation of the use of subsystem global variables, see $Setg_Subsys. For an explanation of $SirParm, see $SirParm.

This $function is new in Version 5.5 of the Sirius Mods.