Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

AMAX( aArray[, nStart[, nStop[, nIndex ]]] )

Purpose

Find maximum element in an array.

Arguments

     aArray -- array to read

     nStart -- start at element -- defaults to 1

     nStop -- stop at element -- defaults to last one

     nIndex -- pass by reference to obtain the index of the largest
                   element.

Setup

All elements are the same data type.

Example

     LOCAL x, index := 0, _array := { 10, 40, 30, 35 }
     x := AMAX( _array, 1, 4, @index )
     ? x, index                      && Returns 40, 2

Returns

The maximum of the elements of the array in the range specified.

Side Effects

If passed by reference, nIndex will point to the element of aArray
containing the maximum value.

Artful Calls

None.

Source File

AA_AMAX.PRG

See Also: AAVG() AMIN() ASUM()

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