Pick from a list

Jul 27, 2009 at 10:51am

Pick from a list

This seems so simple that I’m sure there’s a way to do it, but I can’t find it. I want an object that takes a number and a list, and outputs the [number]element of the list. I *could* do this by having a select 0 1 2 3 4 5 object, and then just put the list elements below, but this is clumsy. How do you do this?

Thanks,
Nick

[EDIT: bah, just found zl nth. still kind of clumsy, but works. I'd want the inputs reversed, should trigger on n, and let me give it a default list]

#44906
Jul 27, 2009 at 12:13pm

zl mth. is that less clumsy?

#161690
Jul 27, 2009 at 12:15pm

‘sfar as I can tell, mth is identical, it just 1-indexes rather than 0-indexes

#161691
Jul 27, 2009 at 1:53pm

zl lookup?

#161692
Jul 27, 2009 at 1:57pm

heh, that’s exactly what I want. Funny, I thought I looked at lookup and decided it wasn’t what I wanted. Thanks.

#161693

You must be logged in to reply to this topic.