$List Global Del and $List Session Del: Difference between revisions

From m204wiki
Jump to navigation Jump to search
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]]).  


The first argument is 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.


==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="caption">$List_Global_Del Function
</p>
<p class="caption">%result is always set to 1.</p>
<p class="code">  
<p class="code">  
  [%RESULT =] $List_Session_Del(name)
  [%RESULT =] $List_Session_Del(name)
</p>
</p>
<p class="caption">$List_Session_Del Function
</p>
<p class="caption">%result is always set to 1.</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"> %RC = $List_Global_Del('TYRANNOSAURUS')
</p>
 
would only delete a global $list named &amp;OSQ.TYRANNOSAURUS&amp;CSQ..


<p class="code"> %RC = $List_Global_Del('STEG*')
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 globals $lists named &amp;OSQ.STEG&amp;CSQ., &amp;OSQ.STEGOSAURUS&amp;CSQ. and &amp;OSQ.STEG.DATA&amp;CSQ. if they existed.
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"> %RC = $List_Session_Del('ST??')
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 named &amp;OSQ.STAN&amp;CSQ., &amp;OSQ.STEP&amp;CSQ. and &amp;OSQ.STUN.DATA&amp;CSQ. if they existed.
The following would delete all session $lists:
<p class="code">%rc = $List_Session_Del('*')</p>


<p class="code"> %RC = $List_Global_Del('"**')
<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>


would delete globals $lists named &amp;OSQ.*&amp;CSQ., &amp;OSQ.*LOOK&amp;CSQ. and &amp;OSQ.*ZAP.DATA&amp;CSQ. if they existed.
<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>.  


<p class="code"> %RC = $List_Session_Del('*')
<li>A <var>$List_Session_Del</var> call when there is no session open causes a request cancellation.  
</p>
</ul>
 
would delete all session $lists.
 
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
 
<p class="code"> %LISTC = $List_Global('VELOCIRAPTOR')
%RC = $List_Global_Del('VEL*')
</p>
 
the $list identifier in %LISTC is no longer valid. <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 $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, <var>$List_Session_Del</var> will delete only $lists created by <var>$List_Session</var>.
 
A <var>$List_Session_Del</var> call when there is no session open causes a request cancellation.  
 
<var>$List_Session_Del</var> is new in Version 6.3 of the <var class="product">[[Sirius Mods]]</var>.<p>


<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>
   
   
</p>
<p>
</p>
[[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, and STEG.DATA, if they existed:

    %rc = $List_Global_Del('STEG*')

    The following would delete session $lists named STAN, STEP, and STUN.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.

Products authorizing $List_Global_Del and $List_Session_Del