Nested EOF() Loops reading multiple files
#41
Mine was simply an outline, not meant to be actual use code. I think others have explained the procedure sufficiently. I have coded mine to be stable by default. While with word lists stability is not important, other applications require relative record order to be maintained. My merge code will always work, provided there is enough disk space. It can be modified to use functions to retrieve records of fixed size to eliminate the need for memory, even MergeSort() itself. I used the array version for ease of implementation. Again, array() could be used as a function that returns the record indicated by the subscript index:

Function Array$(NthRecord&, Record as RecordType, channel%)
Get #channel%. NthRecord&, Record
Array$=Record.whateverfieldyoulike
End function

Of course you'll have to modify the sort routine to reflect this. I used sorting methods that will adapt easily to different non-TYPE data. Otherwise, you'll have to refactor them. Programming this facility into sort/merge is only something that can be done by the programmer to suit the TYPEd data being sorted.
Reply
#42
thks everyone.

I have the ideas now and will let you know what happens

Mike
Reply