Dumb sort question

Ray Horsley ray at linkitonline.com
Wed Dec 4 13:48:01 EST 2002


on 12/4/02 10:26 AM, jbv at jbv.silences at club-internet.fr wrote:

> Hi everybody,
> 
> Sorting a variable made of various lines with several items
> in each line with the sort command is easy :
> 
> sort lines of Myvariable by item 2 of each
> 
> 
> But how can I sort a variable featuring 4 lines with several
> hundreds of items in each, so that (for instance) items of
> line 4 are sorted numeric ascending, and (that's important)
> items of other lines being moved according to the new
> position of each item of line 4 ?
> 
> For instance :
> line 1 :    b,d,c,a
> line 2 :    2,4,3,1
> 
> after sorting line 2, the content would become :
> line 1 :    a,b,c,d
> line 2 :    1,2,3,4
> 
> I have the feeling this can't be done in MC, while I remember
> doing it in OMO using the spreadsheet control...
> 
> Thanks for any suggestion.
> JB
> 
> P.S. I need to do it FAST on large variables, therefore a repeat
> loop won't do.
> 
> 
> 
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
> 

Suggestion:  Think along the lines of an array instead of straight
variables.


Ray Horsley
Developer, LinkIt! Software




More information about the metacard mailing list