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

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{DISPLAYTITLE:$List_Global_Del and $List_Session_Del}}
{{DISPLAYTITLE:$List_Global_Del and $List_Session_Del}}
<span class="pageSubtitle"><section begin="desc" />and $List_Session_Del: Delete global/session $lists<section end="desc" /></span>
<span class="pageSubtitle">and $List_Session_Del: Delete global/session $lists</span>


<p class="warning">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.</p>
<p class="warning">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.</p>
Line 39: Line 39:
</p>
</p>


would only delete a global $list named &OSQ.TYRANNOSAURUS&CSQ..
would only delete a global $list named &amp;OSQ.TYRANNOSAURUS&amp;CSQ..


<p class="code"> %RC = $List_Global_Del('STEG*')
<p class="code"> %RC = $List_Global_Del('STEG*')
</p>
</p>


would delete globals $lists named &OSQ.STEG&CSQ., &OSQ.STEGOSAURUS&CSQ. and &OSQ.STEG.DATA&CSQ. if they existed.
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.


<p class="code"> %RC = $List_Session_Del('ST??')
<p class="code"> %RC = $List_Session_Del('ST??')
</p>
</p>


would delete session $lists named &OSQ.STAN&CSQ., &OSQ.STEP&CSQ. and &OSQ.STUN.DATA&CSQ. if they existed.
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.


<p class="code"> %RC = $List_Global_Del('"**')
<p class="code"> %RC = $List_Global_Del('"**')
</p>
</p>


would delete globals $lists named &OSQ.*&CSQ., &OSQ.*LOOK&CSQ. and &OSQ.*ZAP.DATA&CSQ. if they existed.
would delete globals $lists named &amp;OSQ.*&amp;CSQ., &amp;OSQ.*LOOK&amp;CSQ. and &amp;OSQ.*ZAP.DATA&amp;CSQ. if they existed.


<p class="code"> %RC = $List_Session_Del('*')
<p class="code"> %RC = $List_Session_Del('*')

Revision as of 21:21, 22 November 2011

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).

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

<section begin="syntax" /> [%RESULT =] $List_Global_Del(name) <section end="syntax" />

$List_Global_Del Function

%RESULT is always set to 1.

[%RESULT =] $List_Session_Del(name)

$List_Session_Del Function

%RESULT is always set to 1.

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,

%RC = $List_Global_Del('TYRANNOSAURUS')

would only delete a global $list named &OSQ.TYRANNOSAURUS&CSQ..

%RC = $List_Global_Del('STEG*')

would delete globals $lists named &OSQ.STEG&CSQ., &OSQ.STEGOSAURUS&CSQ. and &OSQ.STEG.DATA&CSQ. if they existed.

%RC = $List_Session_Del('ST??')

would delete session $lists named &OSQ.STAN&CSQ., &OSQ.STEP&CSQ. and &OSQ.STUN.DATA&CSQ. if they existed.

%RC = $List_Global_Del('"**')

would delete globals $lists named &OSQ.*&CSQ., &OSQ.*LOOK&CSQ. and &OSQ.*ZAP.DATA&CSQ. if they existed.

%RC = $List_Session_Del('*')

would delete all session $lists.

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

%LISTC = $List_Global('VELOCIRAPTOR') %RC = $List_Global_Del('VEL*')

the $list identifier in %LISTC is no longer valid. $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.

$List_Session_Del is new in Version 6.3 of the Sirius Mods.

Products authorizing $List_Global_Del and $List_Session_Del