1. Sorting by nth element of a sequence

How do I sort by the nth element of a sequence?  I need to sort about 50
sequences by the 5th element.

Thanks,
Derek Brown

new topic     » topic index » view message » categorize

2. Re: Sorting by nth element of a sequence

On Fri, 18 Jun 1999, you wrote:
> How do I sort by the nth element of a sequence?  I need to sort about 50
> sequences by the 5th element.
>
Use custom_sort()

example:
integer comp5

function compare_5th(sequence a, sequence b)
return compare(a[5],b[5])
end function

comp5 = routine_id("compare_5th")
mydata = custom_sort(comp5,mydata)

Irv

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu