$List_Global_Del and $List_Session_Del

From m204wiki
Revision as of 20:08, 10 February 2011 by Alan (talk | contribs)
Jump to navigation Jump to search

<section begin="desc" />and $List_Session_Del: Delete global/session $lists<section end="desc" />

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