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

Re: [sc-users] concatenating and iteration



Hi,

better do something like

(
var q = [10, 9, 8, 7];

q.do({|item|
    item.postln
})
)

because of
1.) the numbers after q imply, that you want to have an ordered structure
2.) String-interpret is always wwaaaaay sloooooow...
3.) it looks nicer ;-)

hope that helps
Till


On 05 Sep 2005, at 10:06, Mario Lang wrote:

Jeremy Zuckerman <jz@xxxxxxxxxxxxxxx> writes:


how would i get the values assigned to the vars to return in this
situation:
(
var q0, q1, q2, q3;
q0 = 10; q1=9; q2=8; q3=7;

4.do({|i|
    (q++i).postln

("q"++i).interpret.postln


    })
)

//only i is returned not the values assign to q0, q1, etc.

thanks!

--
CYa,
  Mario

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users