(Redirected from Reps)Jump to navigation Jump to search
REPS is a CAOS command controlling flow.
REPS n (int) .. REPE
This creates a bounded loop. REPS opens the loop block and REPE closes it again. The loop block is repeated n times, and then execution continues at the point after REPE.
SETV va01 1 REPS va00 MULV va01 va00 SUBV va00 1 REPE OUTV va01
********Lets make a seed inst reps 5 new: simp 2 3 1000 “tutorial_seed” 1 0 5000 attr 195 bhvr 48 elas 30 fric 50 accg 3 *create some underneath the garden doif tmvt 1950 950 eq 1 mvto 1950 950 else *if that doesn't work, create it at the agent creator for DS setv va00 game “CreatorX” setv va01 game “CreatorY” mvsf va00 va01 endi emit 7 0.3 repe cmrt 0