$ListSavL: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
mNo edit summary
Line 4: Line 4:
<p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListSavL function is [[to be entered]].</p>
<p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListSavL function is [[to be entered]].</p>


This function retrieves the count of items in, and names of, the $lists that have been saved by either the $List_Global, $ListSav, or <var>$ListSave</var> function and not, in the current request, restored by <var>$ListRst</var>.  
This function retrieves the count of items in, and names of, the $lists that have been saved by either the <var>$List_Global</var>, <var>$ListSav</var>, or <var>$ListSave</var> function and not, in the current request, restored by <var>$ListRst</var>.  


The <var>$ListSavL</var> function accepts one argument and returns a numeric error code. It is a [[Calling Sirius Mods $functions|callable]] $function.  
The <var>$ListSavL</var> function accepts one argument and returns a numeric error code. It is a [[Calling Sirius Mods $functions|callable]] $function.  
Line 11: Line 11:


==Syntax==
==Syntax==
<p class="syntax">[%RESULT =] $ListSavL(list_identifier)
<p class="syntax">[%result =] $ListSavL(list_identifier)
</p>
<p>
</p>
</p>
<p><var class="term">%result</var> is a either zero, indicating success, or a negative error code.</p>
<p><var class="term">%result</var> is a either zero, indicating success, or a negative error code.</p>


Line 60: Line 59:
<li>[[Japanese functions]]</li>
<li>[[Japanese functions]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
</ul>
</ul>
   
   
[[Category:$Functions|$ListSavL]]
[[Category:$Functions|$ListSavL]]

Revision as of 18:22, 25 July 2013

Count and names of available global $lists

Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListSavL function is to be entered.

This function retrieves the count of items in, and names of, the $lists that have been saved by either the $List_Global, $ListSav, or $ListSave function and not, in the current request, restored by $ListRst.

The $ListSavL function accepts one argument and returns a numeric error code. It is a callable $function.

The first argument is the identifier of the $list that is to receive the results. The current contents of the $list are deleted and replaced with the item count and names of available saved $lists. Each $list item contains the 10-digit number of items, followed by a blank, followed by the name of a global $list not yet restored by $ListRst in the current User Language request.

Syntax

[%result =] $ListSavL(list_identifier)

%result is a either zero, indicating success, or a negative error code.

Return codes

-3 - Not enough room to store list of counts and names -5 - Required argument not specified -6 - Invalid $list identifier

Example

The following procedure uses $ListSav to save information in various lists, and uses $ListSavL and $ListRst to display the saved lists:

B ... %RESULT = $ListSav(%LIST, 'name') ... END CLOSE ALL B %SAVED = $ListNew %RESULT = $ListSavL(%SAVED) FOR %I FROM 1 TO $ListCnt(%SAVED) %N = $ListInf(%SAVED, %I, 1, 10) %NAME = $ListInf(%SAVED, %I, 12) PRINT %N ' items in ' %NAME ':' %LIST = $ListRst(%NAME) FOR %J FROM 1 TO %N PRINT $ListInf(%LIST, %J) END FOR END FOR END

Products authorizing $ListSavL