/* roco loop example This example shows how coroutines can be used as a loop it also shows the usage of an "array": it first generates the full array, then prints it */ /*the loop stores values 0 to 9 in variables 10 to 19*/ co loop { gt [1] [0] 19 if [1] ac sub [1] [0] 10 set [[0]] [1] inc [0] } /*print variables 10 to 19*/ co print { gt [1] [0] 19 if [1] ac iout [[0]] inc [0] } set [0] 10 ca loop set [0] 10 ca print ac