FT Array Functions

 FT_AADDITION()   Add elements unique of source array to target array
 FT_AAVG()        Average numeric values in an array
 FT_ADESSORT()    Sort an array in descending order
 FT_AEMAXLEN()    Find longest element within an array
 FT_AEMINLEN()    Find shortest element within an array
 FT_AMEDIAN()     Find middle value in array, or average of two middle values
 FT_ANOMATCHES()  Find the number of array elements meeting a condition
 FT_AREDIT()      2 dimensional array editing function using TBrowse
 FT_ASUM()        Sum the elements of an array
 FT_RESTARR()     Restore a Clipper array from a disc file
 FT_SAVEARR()     Save Clipper array to a disc file.

 

FT_AMEDIAN

 FT_AMEDIAN()
 Find middle value in array, or average of two middle values

 Syntax

      FT_AMEDIAN( <aArray> [, <nStart> [, <nEnd> ] ] )
                 -> nMedian

 Arguments

     <aArray> is the array containing the elements to be averaged.

     <nStart> is the first array element to include,
     defaults to first element.

     <nEnd> is the last array element to include,
     defaults to last element.

 Returns

     The median average of the array elements

 Description

     This function sorts the elements of a numeric array and
     then returns the value in the middle element of the sorted
     array.  If there is no exact middle value, then it returns
     the average of the two middle values.  Half of the elements
     are > median and half are < median.  A median average may
     more reflect a more useful average when there are extreme
     values in the set.

 Examples

     FT_AMEDIAN( aArray )      // Return Median for entire array

     FT_AMEDIAN( aArray, 2)    // Return Median for elements from 2 to end

     FT_AMEDIAN( aArray, ,9)   // Return Median for 1st 9 elements

     FT_AMEDIAN( aArray,8,40 ) // Return Median for elements 8 to 40

 Source: AMEDIAN.PRG

 Author: Ralph Oliver,  TRANSCOM SYSTEMS

 

FT_AAVG

FT_AAVG()
 Average numeric values in an array

 Syntax

      FT_AAVG( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> nAverage

 Arguments

     <aArray> is the array containing the elements to be averaged.

     <nStartIndex> is the first array item to include,
     defaults to first element.

     <nEndIndex> is the last array element to include,
     defaults to all elements.

 Returns

     The average of the specified array elements.

 Description

     This function is used to get a numeric average of selected or all
     elements of an array.

     This routine requires FT_ASUM().

 Examples

     FT_AAVG(aSubTotals)          // Get Average of Entire Array

     FT_AAVG(aSubTotals, 5)       // Get Average of 5th Element On

     FT_AAVG(aSubTotals, , 10)    // Get Average of 1st 10 Elements

     FT_AAVG(aSubTotals, 5, 10)   // Get Average of Elements 5-10

 Source: AAVG.PRG

 Author: David Husnian