KCML_Sort_File
Purpose
Sort a file by the given key
Definition
DEFSUB 'KCML_Sort_File(Stream, BYREF Key$()_KCML_SORT_REC_KEY), Length) AS Void
Parameters
| Stream | File handler to be sorted and stored |
| Key | Key - an array of key segments |
| Length | Length - the fixed length of each record |
Description
This function sorts a file using the given key, output back to the input file in sorting order. The key array contains zero or more key segments. Each segment specifies the start and pack format to be used and whether the key should be an ascending or descending key. All numeric pack formats sort in Numeric order. The input file FILE$() will reordered after calling the function. If the key contains no segments then the input will be in the original order.
See also
Internal KCML Functions, Internally defined structures and Internally defined enumerations and constants.