$ListInf: Difference between revisions
(Automatically generated page update) |
(Automatically generated page update) |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Retrieve $list item into string</span> | <span class="pageSubtitle">Retrieve $list item into string</span> | ||
<p class=" | <p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListInf function is the <var>[[Item (Stringlist function)|Item]]</var> function.</p> | ||
This function returns a string containing specified bytes of the current contents of a specified $list item or a negative number indicating that an error has occurred. | This function returns a string containing specified bytes of the current contents of a specified $list item or a negative number indicating that an error has occurred. | ||
Line 24: | Line 24: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><span class="term">%result</span> = <span class="literal">$ListInf</span>(<span class="term">list_identifier</span>, | <p class="syntax"><span class="term">%result</span> = <span class="literal">$ListInf</span>(<span class="term">list_identifier</span>, <span class="term">item_num</span>, [<span class="term">start_col</span>], [<span class="term">length</span>]) | ||
</p> | </p> | ||
Line 30: | Line 30: | ||
<var class="term">%result</var> is a string that contains the indicated piece of the indicated $list item, or it is a negative number if an error has occurred.</p> | <var class="term">%result</var> is a string that contains the indicated piece of the indicated $list item, or it is a negative number if an error has occurred.</p> | ||
===Error codes=== | |||
<p class="code">-5 - Required argument not specified | <p class="code">-5 - Required argument not specified | ||
-6 - $List identifier invalid | -6 - $List identifier invalid | ||
-7 - Item number not found in $list | -7 - Item number not found in $list | ||
-9 - Invalid start column or length | -9 - Invalid start column or length | ||
</p> | </p> | ||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== | ||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
<li>[[Sirius functions]]</li> | <li>[[List of $functions|Sirius functions]]</li> | ||
<li>[[Fast/Unload User Language Interface]]</li> | <li>[[Fast/Unload User Language Interface]]</li> | ||
<li>[[Janus Open Client]]</li> | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | ||
<li>[[Janus Open Server]]</li> | <li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li> | ||
<li>[[Janus Sockets]]</li> | <li>[[Janus Sockets]]</li> | ||
<li>[[Janus Web Server]]</li> | <li>[[Janus Web Server]]</li> | ||
<li> | <li>Japanese functions</li> | ||
<li>[[Sir2000 Field Migration Facility]]</li> | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$ListInf]] | [[Category:$Functions|$ListInf]] |
Latest revision as of 22:51, 20 September 2018
Retrieve $list item into string
Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListInf function is the Item function.
This function returns a string containing specified bytes of the current contents of a specified $list item or a negative number indicating that an error has occurred.
The $ListInf function accepts four arguments and returns a string result.
The first argument is a $list identifier. This is a required argument.
The second argument is the number of the item in the $list. This is a required argument.
The third argument is either a number that specifies the starting column from which data is to be returned, or it is a string containing the name of an image item in the image associated with the $list using $ListImg. In the latter case, the start column for returned data is the position of the image item in the image. This is an optional argument and it defaults to 1.
The fourth argument is a number that indicates the number of columns (characters) to be returned. This is an optional argument and defaults to one of the following values:
- The length of the image item (if the third argument specifies an image item name).
- 255 (the maximum bytes that can be returned by a $function).
If the default or explicit length specified by the fourth argument is more than the number of characters after the start column in the requested $list item, only the characters to the end of the $list item are returned.
Syntax
%result = $ListInf(list_identifier, item_num, [start_col], [length])
%result is a string that contains the indicated piece of the indicated $list item, or it is a negative number if an error has occurred.
Error codes
-5 - Required argument not specified -6 - $List identifier invalid -7 - Item number not found in $list -9 - Invalid start column or length