Feature Request/Clarification?
Hi, I am a little confused about the me.args() functions that are available. It appears that you can pass arguments to shreds during instantiation. What about types? Is the data implicitly passed? Is it only primitive types that we should be passing here? I am assuming passing arrays would cause a massive ChucK boom? What about passing arguments to a currently running shred? I am using * as an imaginary operator that tells ChucK to pass arguments to running shreds. chuck * 1:foo This feature would be endlessly useful. I would like to write something like this: SinOsc s => dac; 440. => s.freq; true => bool keeplooping; while (keeplooping = true){ if( me.argHasMessage(0) ){ keeplooping=me.arg(0); } } Then you could do something like this: chuck * 1:false A related feature would be to declare types and max numbers of arguments for the shred. That way if a passed value violated these declarations the compiler would throw an error and we could begin the search, lest we err. Any light that can be shed on the topic of command line arguments would be greatly appreciated. The only docs appear to be on the web and not in the manual. I would love to rectify this. --art _________________________________________________________________ Enter to win a night a VIP night out at TIFF http://redcarpet.sympatico.msn.ca/
participants (1)
-
Adam Tindale