SORT_FILE
|
Syntax: |
SORT_FILE(<Input File>, <Output
File>, <Ascending/Descending>, <Upper/Lower Case>, <From
Line>, <Position> [,<Separator>
, [<Memory> , [<Macroname>]]])
|
||||||||||||||||||
|
|
|
||||||||||||||||||
|
Meaning: |
SORT_FILE sorts the
sequential file <Input File> and saves the sorted data records in
<Output File>. Each data line of <Input File> must end with a linefeed. <Ascending/Descending> specifies
whether the sorting order is ascending or descending. If <Ascending/Descending>
> 0, the order is ascending, otherwise it is descending. <Upper/Lower Case> specifies whether
small and capital letters are differentiated with sorting. If <Upper/Lower
Case> = 0, there is no differentiation between small and capital
letters, otherwise there is. <From Line> specifies from which line the file is sorted. The
lines before <From Line> are not sorted. <Position> specifies the character at
which sorting starts in data records. Counting starts from 1. <Position> < 1 is equivalent to
1. If a <Separator> <> ²² is specified, the program presumes that the data record of the
<Input File< are separated by a separator. In this case
<Position> specifies the number of a substring (SUBSTR$) that is to be sorted. <Memory> specifies the
size of the program-internal sorting area. <Memory> <= 0 is
equivalent to 100000. In each case <Memory> lines are read from the
<Input File>, sorted and finally saved in a temporary file. Afterwards
a Merge is carried out over the temporary files. If
a <Macroname> is specified the macro is executed every time the
percentage of the work progress changes. EBUS_DATA
contains the percentage of the work progress. If
no <Macroname> is specified the percentage of the work progress is
displayed in the message line. SORT_FILE
returns the following results:
|
||||||||||||||||||
|
Parameter: |
|
||||||||||||||||||
|
Sample: |
H% = SORT_FILE(²Test_file.txt²,²Sort.txt²,1,0,1,3,²;²,0) IF H% <>
0 THEN ERRORMES = ERRORTEXT$ + STR$(H%) ENDIF |
||||||||||||||||||
|
See also: |
|