[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Array: how to get the the index position of a certain value



.indexOf should do the trick...

Roosna & Flak - Contemporary Dance & Music                                                                   
https://www.roosnaflak.com                                                                                   
                                                                                          


On Sat, Jan 5, 2019 at 16:36, <marcello.lussana@xxxxxxxxxxxx> wrote:
hi,

how can retrieve the index position of a value in an array?

something like:
a = [1.2, 2.3, 3.4]
// I would like to know the position of the value 2.3, like
a.indexPosition(2.3) // i made up the name of this method
=> 1

thanks,
Marcello


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/