[REBOL] Question on Sort ? Re:
Mike asked: How would I sort to get name/ages in descending order by name? Have a look at sersort.html in the Users guide. There's a nice little tutorial in there that should help you a lot. Andrew Martin Who keeps his drool in a bucket... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] Question on Sort ? Re:(2)
Mike asked: How would I sort to get name/ages in descending order by name? Have a look at sersort.html in the Users guide. There's a nice little tutorial in there that should help you a lot. Andrew Martin Thanks Andrew. That is exactly what i needed. I got so wrapped up in solving the problem that i forgot to look at the obvious place, Documentation... Also as soon as i sent the message, i realised that once i sorted by name is ascending sequence, just processing the block from tail to head, gives me the data in descending sequence!!! Mike.
[REBOL] Question on Sort ?
Hi All, The following code sorts the name-ages block by name in ascending order, and also keeps the age with the corresponding name. name-ages: ["Larry" 45 "Curly" 50 "Mo" 42 "Mike" 48] == ["Larry" 45 "Curly" 50 "Mo" 42 "Mike" 48] sort/skip name-ages 2 == ["Curly" 50 "Larry" 45 "Mike" 48 "Mo" 42] 1. How would i sort to get name/ages in descending order by name ? 2. How would i sort to get name/ages in ascending order by age ? 3. How would i sort to get name/ages in descending order by age ? I've a feeling it's got something to do with the compare refinement, but at this point in time, it doesn't make much sense to me. Thanks in advance. Mike.