$List Global Del and $List Session Del: Difference between revisions
m (1 revision) |
m (1 revision) |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle">$List_Global_Del and $List_Session_Del: Delete global/session $lists</span> | <span class="pageSubtitle">$List_Global_Del 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 <var>$List_Global_Del</var> and <var>$List_Session_Del</var> 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 <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, <var>$List_Global</var> or <var>$List_Session</var> in the current or any previous <var class="product">User Language</var> program. It always returns a result of 1. | ||
<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]]). | <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. | 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 23: | 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: | 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 61: | Line 61: | ||
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 <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') | <p class="code"> %LISTC = $List_Global('VELOCIRAPTOR') | ||
Line 67: | Line 67: | ||
</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. <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 $List_Session. | ||
A $List_Session_Del call when there is no session open causes a request cancellation. | 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> | <var>$List_Session_Del</var> is new in Version 6.3 of the <var class="product">[[Sirius Mods]]</var>.<p> | ||
Line 86: | Line 86: | ||
</p> | </p> | ||
<p class="caption">Products authorizing $List_Global_Del and $List_Session_Del | <p class="caption">Products authorizing <var>$List_Global_Del</var> and $List_Session_Del | ||
</p> | </p> | ||
[[Category:$Functions|$List_Global_Del and $List_Session_Del]] | [[Category:$Functions|$List_Global_Del and $List_Session_Del]] |
Revision as of 00:48, 19 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" />
[%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.