[chuck-users] eval and concatenating strings

altern altern2 at gmail.com
Mon Nov 13 21:08:04 EST 2006


hi again

here i am with couple of questions again.

is there a way to concatenate strings? I am trying different ways with 
no much luck and i have checked the docs but i could not find a way to it.

another issue is:
is there a way to eval a string as code like in python or actionscript?

The questions come from some commands i am forced to type over and over 
despite of being almost identical

recv.event("/0/mute, i") @=> OscEvent mute0_osc;

the only difference of the number (0 in this case) for each of the 
sample players i have constructed

Would it be possible to create variables on the fly from concatenated 
strings?
I mean something like (in wish code)

for (0 => int n; n < 8; n++){
	"/" + Std.itoa(n) + "/mute, i" @=> string address; //concatenate string
	recv.event(address) @=> OscEvent Std.eval("mute"+ Std.itoa(n) + 
"_osc"); //concatenate and eval string
}

thanks

enrike



More information about the chuck-users mailing list