home *** CD-ROM | disk | FTP | other *** search
- *....ACOMP: Do comparison up and down entire array, returning value of
- *.... of element that is the least or greatest
- *....
- *....acomp( <aArray>, <bComp>, <[nStart]>, <[nStop]> ) --> (array element)
- *....
- *....Parameters:
- *....
- *.... aArray - Array of ? to compare
- *.... bComp - Block that compares two elements and returns .T. if first
- *.... element is the answer you want
- *.... nStart - Element to start on
- *.... nStop - Element to stop on
- *....
- *....Returns:
- *....
- *.... Element that satisfies request
- *....
-
- function acomp( aArray, bComp, nStart, nStop )
-
- local uVal := aArray[1]
-
- aeval( aArray, {|x| uVal := iif( eval( bComp, x, uVal) , x, uVal )}, nStart, nStop )
-
- return( uVal )
-