SORT action


Function
The action sorts the structure according by given parameters.
Declaration
 SORT _Item1, _bAscItem1[, _Item2, _bAscItem2[, ... _Item5, _bAscItem5]]

Parameters
_item1, ... in Column identifier of a RECORD type local variable.
_bAscItem1, ... out Identifier of BOOL type - sort type (Ascending).

Description
The action sorts a structure (changes the order of rows). Sorting may by defined by one (_Item1) or more columns (various, at most 5 columns). For each column, there is specified the sort type by the parameter _bAscItem1 (@TRUE ascending).
Example
RECORD (SD.RecordDef) _struct
 ....... 
 
 ; Sorting according to the column Text in ascending order
 SORT _struct^Text, @TRUE
 
 ; Sorting according to the column Text in ascending order 
 ; and simultaneously according to the column Int in descending order
 SORT _struct^Text, @TRUE, _struct^Int, @FALSE

Note
If sorting is executed according to a column containing invalid values, they are to be less than valid ones. The invalid values are to be in the beginning in ascending order.

Related pages:

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .