$List Global Del and $List Session Del: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />and $List_Session_Del: Delete global/session $lists<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />and $List_Session_Del: Delete global/session $lists<section end="desc" /></span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. | <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> | ||
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. | 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 ( | $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. | 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) | ||
Line 22: | Line 23: | ||
<p class="caption">%RESULT is always set to 1.</p> | <p class="caption">%RESULT is always set to 1.</p> | ||
The name specified for $List_Global_Del or $List_Session_Del can be an explicit name or it can contain the following wildcard characters: | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>*</th> | <tr><th>*</th> | ||
Line 32: | Line 33: | ||
<td>Indicates that the next character must be treated literally even if it is a wildcard character. | <td>Indicates that the next character must be treated literally even if it is a wildcard character. | ||
</td></tr></table> | </td></tr></table> | ||
For example, | For example, | ||
<p class="code"> %RC = $List_Global_Del('TYRANNOSAURUS') | <p class="code"> %RC = $List_Global_Del('TYRANNOSAURUS') | ||
</p> | </p> | ||
would only delete a global $list named &OSQ.TYRANNOSAURUS&CSQ.. | would only delete a global $list named &OSQ.TYRANNOSAURUS&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 &OSQ.STEG&CSQ., &OSQ.STEGOSAURUS&CSQ. and &OSQ.STEG.DATA&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 &OSQ.STAN&CSQ., &OSQ.STEP&CSQ. and &OSQ.STUN.DATA&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 &OSQ.*&CSQ., &OSQ.*LOOK&CSQ. and &OSQ.*ZAP.DATA&CSQ. if they existed. | ||
<p class="code"> %RC = $List_Session_Del('*') | <p class="code"> %RC = $List_Session_Del('*') | ||
</p> | </p> | ||
would delete all session $lists. | 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 | 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 | ||
<p class="code"> %LISTC = $List_Global('VELOCIRAPTOR') | <p class="code"> %LISTC = $List_Global('VELOCIRAPTOR') | ||
%RC = $List_Global_Del('VEL*') | %RC = $List_Global_Del('VEL*') | ||
</p> | </p> | ||
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. | 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 | 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]]''.<p> | $List_Session_Del is new in Version 6.3 of the ''[[Sirius Mods]]''.<p> |
Revision as of 20:08, 10 February 2011
<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" />
[%RESULT =] $List_Session_Del(name)
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.