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_AEMINLEN

FT_AEMINLEN()
 Find shortest element within an array

 Syntax

      FT_AEMINLEN( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] )
                 -> nMinlen

 Arguments

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

     <nDimension> is the array dimension to be measured,
                defaults to first dimension.

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

     <nCount> is the number of array elements to process from
                from <nStart>, defaults to remaining elements
                in array.

 Returns

     The length of the shortest size element of an array.

 Description

     This function will measure each element of an array
     dimension and return the shortest element.

 Examples

     FT_AEMINLEN(aArray)       // Measure the 1st dimension of an Array

     FT_AEMINLEN(aArray,2)     // Measure the 2nd dimension of an Array

     FT_AEMINLEN(aArray,2,,9)  // Measure Elements 1-9 of 2nd dimension

     FT_AEMINLEN(aArray,3,5,9) // Measure Elements 5-9 of 3rd dimension

     FT_AEMINLEN(aArray,3,5)   // Measure Elements 5 to end of 3rd dimension

 Source: AEMINLEN.PRG

 Author: Ralph Oliver,  TRANSCOM SYSTEMS

See Also: FT_AEMAXLEN()


FT_AEMAXLEN

 FT_AEMAXLEN()
 Find longest element within an array

 Syntax

      FT_AEMAXLEN( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] ) ;
                 -> nMaxlen

 Arguments

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

     <nDimension> is the array dimension to be measured,
                defaults to first dimension.

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

     <nCount> is the number of array elements to process from
                from <nStart>, defaults to remaining elements
                in array.

 Returns

     The length of the longest size element of an array.

 Description

     This function will measure each element of an array
     dimension and return the longest element.

 Examples

     FT_AEMAXLEN(aArray)       // Measure the 1st dimension of an Array

     FT_AEMAXLEN(aArray,2)     // Measure the 2nd dimension of an Array

     FT_AEMAXLEN(aArray,2,,9)  // Measure Elements 1-9 of the
                                     2nd dimension or subarray

     FT_AEMAXLEN(aArray,3,5,9) // Measure Elements 5-9 of the
                                     3rd dimension or subarray

     FT_AEMAXLEN(aArray,3,5)   // Measure Elements 5 to last in the
                                     3rd dimension or subarray

 Source: AEMAXLEN.PRG

 Author: Ralph Oliver,  TRANSCOM SYSTEMS

See Also: FT_AEMINLEN()


			

FT_ADESSORT

FT_ADESSORT()
 Sort an array in descending order
------------------------------------------------------------------------------

 Syntax

      FT_ADESSORT( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> aSorted

 Arguments

     <aArray> is the array to be sorted

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

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

 Returns

     The array, sorted in descending order.

 Description

     This function is used to sort an array in descending order, i.e., Z-A

 Examples

     FT_ADESSORT(aNames)               // Sort the Entire Array

     FT_ADESSORT(aNames, 5)            // Sort from the 5th Element On

     FT_ADESSORT(aNames, , 10)         // Sort the 1st 10 Elements

     FT_ADESSORT(aNames, 5, 10)        // Sort Elements 5-10

 Source: ADESSORT.PRG

 Author: David Husnian

 


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

 

 

FT_AADDITION

 FT_AADDITION()
 Add elements unique of source array to target array

 Syntax

      FT_AADDITION( <aList1>, <aList2> [, <lTrimmer> [, <lCaseSens> ] ] ) ;
              -> aNewArray

 Arguments

     <aList1> is the primary array.

     <aList2> is the secondary array.

     <lTrimmer> is a logical value denoting whether leading or
             trailing spaces should be included in the
             comparison. If .T., then ignores spaces in
             comparison, defaults to .T., .F. includes spaces.

     <lCaseSens> is a logical value denoting case sensitivity.
             If .T., then comparison is sensitive to case,
             defaults to .T., .F. ignores case.

 Returns

     An array of the union of aList1 and aList2.

 Description

     This function will add the elements unique of aList2 with aList1.
     It returns a new array including all the elements of aList1
     plus the unique elements of aList2.

 Examples

     aList1 := {"apple", "orange", "pear"}
     aList2 := {"apple ", "banana", "PEAR"}

     FT_AADDITION( aList1, aList2 )
          // ignores spaces, sensitive to case
          // returns {"apple","orange","pear","banana","PEAR"}

     FT_AADDITION( aList1, aList2, , .F. )
          // ignores spaces, not sensitive to case
          // returns {"apple","orange","pear","banana"}

     FT_AADDITION( aList1, aList2, .F., .F. )
          // sensitive to spaces, not sensitive to case
          // returns {"apple","orange","pear","apple ","banana"}

 Source: AADING.PRG

 Author: Ralph Oliver,  TRANSCOM SYSTEMS

 

HMG Samples

About HMG Samples

Language Related

 Arrays

Array Arithmetic

Load / Save ANY array

Conversion

DOS -> Windows Character Conversion

National Issues

National Alternate Collating Sequence

National Change Case

 Windows

Tracking Mouse

Controls

Browse

Quick Search    

Combo box

Dynamic ComboBox

Edit Box

Word wrap in EditBox

 Grid

Get Data Into Grid via IDE

Text Box

Auto fill in text box

Search in and Fill Box (SFilBox) 

Tree

Tree Menu

Two Methods for Tree

Functions

 Drives, Directories and Files

Drives and Directories

Directory List

Fill Directory List

PutFile() with default file name

Messages

HMG Message Functions

Message for multiple values

Message Extended

Where Is It ?

Improvements in Message functions

Miscellaneous

Is application running ?

Get Process ID

Simple Error Handling

Funny

Cuckoo Clock

Untouchable window

Warn Lazy User

Pegs Game

Drawing

Play Draw

Draw Border

Printing

 Text Mode

Using printer under Windows 

Obsolete ways

Send to File

Print File

GUI Mode

HMG Print

 HMG Print ( Mini Print ) for beginners in 10 easy steps

Print a plain text file by HMG Print – 1

HMG Report

HMG HPDF

HMG_HPDF — Bill

Unicode

HMG Unicode

Utilities

Color Codes

DB Validate 

Hex View

Mini Agenda

DBA : Data Base Assistant

Low-Level DBU

x-Base Modul List

Mini Search Machine (2014) 

Simple Clipper Extensions

Simple extensions

Exact comparisons,
Name precedence,
SELECT 0,
Alias functions,
Call by reference and value,
Other Clipper extensions

Design of Clipper

build the truly reusable routine