output item number with highest value in a list

n871's icon

Hi everyone,

the list "9 0 43 65 8 3 5 1"

should result in an output of 4, because the fourth item (65) is the highest in the list.

the list "0 1 2 3 4 5 6 7"

should result in an output of 8, because the eight item (7) is the highest in the list.

All my lists are 8 items long without repeats, every number will be unique.

Does anyone have an idea how to do this? All help is very much appreciated!

Source Audio's icon

zl.sort will give you what you need.

index of reordered list items is zero based,

add 1 to have it as you want

Sébastien Gay's icon

This one seems to achieve what you want ?

n871's icon

Thanks Sébastien & Source audio. This forum is the best! I forgot about the index output of zl.sort.