arraynumericsort
arraynumericsort
INPUTARRAY
,
OUTPUTARRAY
,
SEPARATOR

The arraynumericsort statement sorts all the numeric elements of a text array in proper numeric order.

Parameters

This statement has three parameters:

inputarray – the original text array containing numeric values.

outputarray – a copy of the original array sorted numerically.

separator – the separator character or characters.

Description

The ArrayNumericSort statement sorts a text array that contains numeric values. See the arraynumericsort( function for details about the process of numerically sorting an array.

This code

    local thenumbers
    thenumbers="25.7;52.8;3.14;12.6"
    arraynumericsort thenumbers, thenumbers,";"

will assign the value `3.14;12.6;25.7;52.8` to the variable thenumbers.

See Also

- arraydeduplicate -- removes duplicate elements from an array (see Text Arrays).
- arrayintegersort -- sorts all the numeric elements of a text array in proper numeric order.
- batchreplace( -- performs multiple find/replace operations on a piece of text.
- listchoices( -- builds a text array containing a list of all the values stored in a specified field.
- lookupall( -- builds a text array containing one item for every record in the target database where the data in the keyField matches the keyData. Each item in the text array contains the value extracted from the dataField for that record. If the data field is a numeric or date field, it is converted to text using the default patterns for that field.
- lookupalldouble( -- is similar to the lookupall( function, but it returns two fields from the target database instead of just one.
- lookupalloctet( -- is similar to the lookupall( function, but it returns eight fields from the target database instead of just one.
- lookupallquadruple( -- is similar to the lookupall( function, but it returns four fields from the target database instead of just one.
- lookupallquintuplet( -- is similar to the lookupall( function, but it returns five fields from the target database instead of just one.
- lookupallseptuplet( -- is similar to the lookupall( function, but it returns seven fields from the target database instead of just one.
- lookupallsextet( -- is similar to the lookupall( function, but it returns six fields from the target database instead of just one.
- lookupalltriple( -- is similar to the lookupall( function, but it returns three fields from the target database instead of just one.

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, however, this is now a native function instead of being implemented as a custom statement. It's much faster and more robust than it was in Panorama 6.0. In addition, the arrayintegersort statement is now identical to the arraynumericsort statement. More than one character is now allowed for use as the separator parameter.