index of the higher number in a list?
hi
I feel I almost have it, but not quite........ something is missing (maybe coffe??) :
given a list of 4 ints (a b c d), I want to know the index (position) of the higher/greatest of them
(if it is, say (8 4 5 7) it would be 1, if ( 8 12 6 9), 2 etc)
If 2 of them are equal, i will choose one (in some way, might be the first in list, whatever - let's suppose they can not be equal.....)
any help?
many thanks
kasper
Ltop from the Lobjects just does this.
[zl sort] is your very simple friend:
many thanks to both - I was looking into ZL and Lobjects, but obviousely lacked coffee!!!!!!
k
encore plus simple ... maximum
Right. I forgot maximum can deal with lists.
can also be done with coll/max, a bit cumbersome though
!!!!!!!!!!!!!!!!!!!!!
thanks all
!!!!!!!!!!!!!!!!!!!!!!
k