Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_arrnum() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_ARRNUM()

 DESCRIPTION

 C_ARRNUM() performs a search of a given numeric array for a
 specified numeric value.

 NOTES

 C_ARRNUM() only searches a Clipper numeric array for a numeric
 value.  For this purpose, it performs a faster search than
 Clipper's ASCAN().

 All of the elements in the array must be defined as a numeric (no
 array element can have a type of undefined).

 C_ARRNUM() searches the array until the specified value is found or
 a zero (0) is encountered.

 SYNTAX

 C_ARRNUM(array, value)

 PARAMETERS

 array (A) is the numeric Clipper array to search for the specified
 value.  The array argument is specified without quotes.

 value (N) is the numeric value to search for in the array.

 RETURNS

 C_ARRNUM() returns the array element where the specified value is
 found or zero (0) if the value is not found.

 EXAMPLES

 private arr1[6]
 arr1[1] = 25
 arr1[2] = 50
 arr1[3] = 75
 arr1[4] = 100
 arr1[5] = 0
 arr1[6] = 0

 ? c_arrnum(arr1,75)   --> 3
 ? c_arrnum(arr1,0)    --> 5      && first zero slot available
 ? c_arrnum(arr1,99)   --> 0      && not found


See Also: C_ARRCT() C_ARRSTR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson