This code used to compile, but now my locally defined yield proc causes a syntax error (at end). What it does is yield for a certain amount of time, calling the passed function (x). What's the syntax for that these days?
proc animation { // variables //my periodical task var t = 0; var x = { draw_stars(c_pos); var d = sin(2.0*KPI/40.0*double_of(t))*double_of(jit_amp); //draw the ship draw_frame(SHIP_FRM, get_scratch(), s_pos-c_pos, 80 + int_of(d)); s_pos += s_vel; //integrate, numerically. s_vel += s_acc; c_pos += c_vel; t++; }; //and now my augmented yield proc yield(n: int) { co_yield(x, n); } // do a yield(100); // do b yield(200); } !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; s_pos += s_vel ; s_vel += s_acc ; c_pos += c_vel ; t ++ ; } 0: ; proc yield Syntax Error before token 4046 in flx/hw.flx, line 785 col 12 ( n : int ) { 0: } 0: var delay = ( SCRN_WIDE / 2 - ( SHIP_X0 - CAM_X0 ) ) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Flx_exceptions.ParseError("Error parsing input") PARSE ERROR Unknown exception Parsing File ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language