It appears as a reserved keyword here
http://chuck.cs.princeton.edu/doc/language/overview.html#reserve
2010/9/23 Andrew C. Smith
you need the following:
now => time then;
do { ... } until (then < (now - 10::second));
also, I'm not sure that "do..until" is a functioning construct. It may just be a keyword in the miniAudicle, maybe a scrap from its Java-based highlighting (right? java?)
-Andrew
2010/9/23 Timothy Leonido
: Would anyone mind sending a good example for loop "until" ? I simply want a shred to stop automatically after a 10 seconds. Here is what I wrote:
do{
Std.rand2f(200,50.0) + Math.sin(v*100.0)*20.0 => v2 => f.pfreq;
Std.rand2f(5000.0, 60) + Math.sin(v*30.0)*80.0 => f3.pfreq;
Std.rand2f(1500, 80.0) + Math.sin(v*200.0)*50.0 => f2.pfreq;
std.rand2f(.551,.549)=>buf.rate;
.0+(.9*maybe)=>buf.gain;
0=>buf.pos;
.1:: T =>now; } until (5::second);
thanks so much!
-tim
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- http://www.twitter.com/lfzawacki http://www.linesocode.wordpress.com http://www.umblag.wordpress.com