LOOP A=INT(RND(1)*20) PRINT(A) IF A=10 THEN EXIT LOOP END IF !EXIT FOR works the same inside FOR loops PRINT(INT(RND(1)*20)) END LOOP