$List Global Del and $List Session Del: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 8: | Line 8: | ||
<var>$List_Global_Del</var> and <var>$List_Session_Del</var> accept one argument and return a numeric result. Both are callable $functions (see [[Calling Sirius Mods $functions]]). | <var>$List_Global_Del</var> and <var>$List_Session_Del</var> accept one argument and return a numeric result. Both are callable $functions (see [[Calling Sirius Mods $functions]]). | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" />[%RESULT =] $List_Global_Del(name) | <p class="syntax"><section begin="syntax" />[%RESULT =] $List_Global_Del(name) | ||
<section end="syntax" /></p> | <section end="syntax" /></p> | ||
<p class="code"> | <p class="code"> | ||
[%RESULT =] $List_Session_Del(name) | [%RESULT =] $List_Session_Del(name) | ||
</p> | </p> | ||
The name specified for <var>$List_Global_Del</var> or <var>$List_Session_Del</var> can be an explicit name or it can contain the following wildcard characters: | ===Syntax terms=== | ||
<table class="syntaxTable"> | |||
<tr><th>%result</th> | |||
<td>Always set to 1.</td></tr> | |||
<tr><th>%result</th> | |||
<td>The name of the global or session $list or $lists to be deleted. If not specified, only a $list with a null name is deleted. This argument can contain wildcard characters, as described below.</td></tr> | |||
</table> | |||
==Usage notes== | |||
<ul> | |||
<li>The name specified for <var>$List_Global_Del</var> or <var>$List_Session_Del</var> can be an explicit name or it can contain the following wildcard characters: | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 34: | Line 37: | ||
</td></tr></table> | </td></tr></table> | ||
For example, | For example, the following statement would delete only a global $list named <code>TYRANNOSAURUS</code>: | ||
<p class="code">%rc = $List_Global_Del('TYRANNOSAURUS')</p> | |||
<p class="code"> % | |||
</p> | |||
<p class="code"> % | The following would delete globals $lists named <code>STEG</code>, <code>STEGOSAURUS</code>, and <code>STEG.DATA</code>, if they existed: | ||
</p> | <p class="code">%rc = $List_Global_Del('STEG*')</p> | ||
would delete | The following would delete session $lists named <code>STAN</code>, <code>STEP</code>, and <code>STUN.DATA</code>, if they existed: | ||
<p class="code">%rc = $List_Session_Del('ST??')</p> | |||
<p class="code"> % | The following would delete globals $lists named <code>*</code>, <code>*LOOK</code>, and <code>*ZAP.DATA</code>, if they existed: | ||
</p> | <p class="code">%rc = $List_Global_Del('"**')</p> | ||
would delete session $lists | The following would delete all session $lists: | ||
<p class="code">%rc = $List_Session_Del('*')</p> | |||
<p class="code"> % | <li>When a <var>$List_Global_Del</var> or <var>$List_Session_Del</var> is issued against a global or session $list that has a $list identifier associated with it, that $list identifier becomes invalid. For example, after issuing the following sequence, the $list identifier in <code>%listc</code> is no longer valid: | ||
</p> | <p class="code">%listc = $List_Global('VELOCIRAPTOR') | ||
%rc = $List_Global_Del('VEL*')</p> | |||
<var>$List_Global_Del</var> does not distinguish among the manner in which a global $list was created; it will delete any $list created with <var>$List_Global</var>, <var>$Listsave</var>, or <var>$Listsav</var>, whether or not it has been referred to with any of these $functions in the current request. Since session $lists can only be created with <var>$List_Session</var>, <var>$List_Session_Del</var> will delete only $lists created by <var>$List_Session</var>. | |||
< | <li>A <var>$List_Session_Del</var> call when there is no session open causes a request cancellation. | ||
</ul> | |||
A <var>$List_Session_Del</var> call when there is no session open causes a request cancellation. | |||
<h2>Products authorizing $List_Global_Del and $List_Session_Del</h2> | <h2>Products authorizing $List_Global_Del and $List_Session_Del</h2> | ||
Line 83: | Line 71: | ||
<li>[[Japanese functions]]</li> | <li>[[Japanese functions]]</li> | ||
<li>[[Sir2000 Field Migration Facility]]</li> | <li>[[Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$List_Global_Del and $List_Session_Del]] | [[Category:$Functions|$List_Global_Del and $List_Session_Del]] |
Revision as of 20:57, 25 October 2012
$List_Global_Del and $List_Session_Del: Delete global/session $lists
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $List_Global_Del and $List_Session_Del functions.
These functions delete one or more global or session $lists that were created with either $LISTSAV, $LISTSAVE, $List_Global or $List_Session in the current or any previous User Language program. It always returns a result of 1.
$List_Global_Del and $List_Session_Del accept one argument and return a numeric result. Both are callable $functions (see Calling Sirius Mods $functions).
Syntax
<section begin="syntax" />[%RESULT =] $List_Global_Del(name) <section end="syntax" />
[%RESULT =] $List_Session_Del(name)
Syntax terms
%result | Always set to 1. |
---|---|
%result | The name of the global or session $list or $lists to be deleted. If not specified, only a $list with a null name is deleted. This argument can contain wildcard characters, as described below. |
Usage notes
- The name specified for $List_Global_Del or $List_Session_Del can be an explicit name or it can contain the following wildcard characters:
* Matches any number of characters including none ? Matches any single character " Indicates that the next character must be treated literally even if it is a wildcard character. For example, the following statement would delete only a global $list named
TYRANNOSAURUS
:%rc = $List_Global_Del('TYRANNOSAURUS')
The following would delete globals $lists named
STEG
,STEGOSAURUS
, andSTEG.DATA
, if they existed:%rc = $List_Global_Del('STEG*')
The following would delete session $lists named
STAN
,STEP
, andSTUN.DATA
, if they existed:%rc = $List_Session_Del('ST??')
The following would delete globals $lists named
*
,*LOOK
, and*ZAP.DATA
, if they existed:%rc = $List_Global_Del('"**')
The following would delete all session $lists:
%rc = $List_Session_Del('*')
- When a $List_Global_Del or $List_Session_Del is issued against a global or session $list that has a $list identifier associated with it, that $list identifier becomes invalid. For example, after issuing the following sequence, the $list identifier in
%listc
is no longer valid:%listc = $List_Global('VELOCIRAPTOR') %rc = $List_Global_Del('VEL*')
$List_Global_Del does not distinguish among the manner in which a global $list was created; it will delete any $list created with $List_Global, $Listsave, or $Listsav, whether or not it has been referred to with any of these $functions in the current request. Since session $lists can only be created with $List_Session, $List_Session_Del will delete only $lists created by $List_Session.
- A $List_Session_Del call when there is no session open causes a request cancellation.