ArSearch

Format: ArSearch(array, elem [, index ])

Purpose: Searches for elem in array, starting with element index. The array parameter must denote an object. The elem parameter can be of any type including null. The index parameter must be an integer. If index is not given, it defaults to 0.

Return Values: Returns index of elem in array if elem is found, null otherwise.

Example:

input:
<let a=array(3);           // Declare an empty array
 a[0]=1; a[1]=2; a[2]="x"; // Assign values
 ? ArSearch (a,2,0);       // Search for element with value 2.
 ? " ";
 ? ArSearch (a,7,0) "Nn";  // Search for element with value 7.
>
resulting output:
1 null

See Also: array(), ArAppend(), ArConcat().


This page was dynamically generated by the web application development tool RADpage of H.E.I.
© 1996-2013 H.E.I. All Rights Reserved.