Sorting an array

Jose Lerebours fpgroups at gmail.com
Wed Jun 1 11:15:08 PDT 2016


My heart is simply pounding!

No one in this "never" stuck his/her neck out for me  ;-)    and much 
less if it involved those that smashed my head in.

Thank you!   I hope this does not come at a cost to you Richard ...




On 06/01/2016 02:03 PM, Richard D. Williams via Filepro-list wrote:
> On 5/19/2016 2:00 PM, Kenneth Brody via Filepro-list wrote:
>> On 5/18/2016 12:15 PM, Richard Kreiss via Filepro-list wrote:
>> > I would like to be able to sort a 20 element array.
>> >
>> > Any suggestion as to how best to do this on a Windows machine?
>>
>> After all the discussion about overhead of external tools, I think a 
>> lot of this boils down to how often is this sort going to be done.
>>
>> There's a world of difference in sorting 20 items once, prior to 
>> running a million-record report, and once per record on a 
>> million-record report.
>>
> Wow. I read all the emails in this thread and frankly, it was a waste 
> of time.
> As usual, Mark had way too much to say that never addressed the problem.
> Again, Jose was his target.
>
> In the end, Jose was right.
> The simplest solution is to create some temp file that could be used 
> for any number of elements in an array.
>
> If you have a simple one or two data sort, write out the original 
> element number, data one, and data two into this temp file.
> Make sure there is an index build on data one and data two in the temp 
> file.
> After you have finished writing to this temp file, read the data back 
> into a new array by that index.
> You can use the original element number to get the rest of the data 
> from the original array.
>
> Now replace the data elements in the original array wit the new array 
> and clear the new array and clear the temp file.
> I often use the user's "TTY"  (linux) to make that instance unique.
>
> Done!
>
> Richard D. Williams
>
>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list