$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 6: Line 6:
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 <var class="product">User Language</var> program. It always returns a result of 1.  
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 <var class="product">User Language</var> 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]]).  
<var>$List_Global_Del</var> 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.
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.
Line 71: Line 71:
A $List_Session_Del call when there is no session open causes a request cancellation.  
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 <var class="product">[[Sirius Mods]]</var>.<p>
<var>$List_Session_Del</var> is new in Version 6.3 of the <var class="product">[[Sirius Mods]]</var>.<p>


<ul class="smallAndTightList">
<ul class="smallAndTightList">

Revision as of 23:44, 18 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).

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