![]() ![]() ![]() ![]() | Table Of Contents | Index |
Example:
Sort a Text File:Usage: DIR|MARXMENU SORT|MORE MARXMENU SORT INFILE OUTFILE
SORT.MNU var SortBuf StandardIO ReadTextFile (ParamStr(2),SortBuf) SortArray(SortBuf) WriteTextFile (ParamStr(3),SortBuf)
Example:
var ListList[1] = 'James' List[2] = 'Adam' List[3] = 'Kate' List[4] = 'Ben' List[5] = 'Don' ; the above creates the array List with 5 elements
SortArray(List) ; List is sorted Loop List ;Loop through List so as to display the elements Writeln LoopVal EndLoop
The result of this example is: Adam Ben Don James Kate
See Also: | SortArrayLinked |
---|
Category: | Array |
---|
![]() ![]() ![]() ![]() | Table Of Contents | Index |
|