difference between [zl nth 3] and $3 ?

Oct 1, 2011 at 12:03am

difference between [zl nth 3] and $3 ?

if i want the third item of a list, regardless of type, is there any difference between [zl nth 3] and a message containing just “$3″? they seem to work the same..

Oct 1, 2011 at 1:27am

pretty sure they are practically identical but may have different uses, for example you can set the zl nth value dynamically, whereas the $ variables are fixed when you create them (or at least I’ve never found a way to change them).

Oct 2, 2011 at 12:50am

So this post got me thinking. What if you could change the variable number in a message? However, when I try it using [sprintf], I get odd results. As long as the incoming integer is 10 or less, I get the expected result ($1, $2, $-1, $10, etc.) Once I get to 11, though, the result is $11, $12, $13, etc., except when the input is a multiple of 10 (20, 30, 40, etc.). In that case, I again get the expected result ($20, $30, $40, etc.). Can someone explain why this happens? Is it an oddity of the message that I don’t understand? Thanks.

– Pasted Max Patch, click to expand. –
Oct 2, 2011 at 3:03pm

Yes, this is weird. But anyway, anything above $9 won’t be usefull. As stated in the message reference :

A dollar sign ($), followed immediately by a number in the range 1-9, is a changeable argument.

Oct 2, 2011 at 9:43pm

also if you want to set bpatcher’s arguments, you can’t set more than 9. but why? is there any logic behind that?


You must be logged in to reply to this topic.