$ListFind: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 32: Line 32:
The difference between <var>$ListFind</var> and [[$ListLoc]] is that with $ListFind, a $list item must match the search string exactly rather than simply containing the search string. Moreover, <var>$ListFind</var> does not allow specification of a range of columns (or positions) that are to be searched.<p>
The difference between <var>$ListFind</var> and [[$ListLoc]] is that with $ListFind, a $list item must match the search string exactly rather than simply containing the search string. Moreover, <var>$ListFind</var> does not allow specification of a range of columns (or positions) that are to be searched.<p>


<h2>Products authorizing {{PAGENAMEE}}</h2><ul class="smallAndTightList">
==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>

Revision as of 21:32, 7 November 2012

Find string in $list

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ListFind function are the Find and FindUp (Stringlist functions).


This function locates a $list item that exactly matches a specified string.

The $ListFind function accepts three arguments and returns the item number of the $list item that matches the string or an error code. It is a callable $function.

The first argument is the identifier of the $list in which a string is to be located. This is a required argument.

The second argument is the string to be matched. This is a required argument.

The third argument is a number that indicates the item number at which the search is to begin. If this argument is not specified searching begins at the first item in the $list.

Syntax

<section begin="syntax" />[%RESULT =] $ListFind(list_identifier, search_string, start_item) <section end="syntax" />

%result is set either to the item number of the first item in the $list that matches the search criteria, or to a negative number if an error has occurred.

-5 - Required argument not specified -6 - $List identifier invalid -7 - Item number not found in $list -8 - String not found (if $list empty, -7)

$ListFind Error Codes

The difference between $ListFind and $ListLoc is that with $ListFind, a $list item must match the search string exactly rather than simply containing the search string. Moreover, $ListFind does not allow specification of a range of columns (or positions) that are to be searched.

Products authorizing $ListFind