Loops/Nested: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: added a comment. -- ~~~~ |
Added BBC BASIC |
||
Line 134:
NEXT col
NEXT row</lang>
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
<lang bbcbasic> DIM array(10,10)
FOR row% = 0 TO 10
FOR col% = 0 TO 10
array(row%,col%) = RND(20) + 1
NEXT
NEXT row%
FOR row% = 0 TO 10
FOR col% = 0 TO 10
IF array(row%,col%) = 20 EXIT FOR row%
NEXT
NEXT row%
IF row%<=10 PRINT "Found at row "; row% " column " ; col%</lang>
EXIT FOR can jump out of multiple nested loops by specifying a control variable.
=={{header|bc}}==
|