g example shows:<BR>
<BR>
<PRE><FONT FACE=courier COLOR=BLUE>FOR A=1 TO 5
PRINT "MAIN A=";A
FOR B=1 TO 10
PRINT "LITTLE B=";B
NEXT B
NEXT A
</FONT></PRE>The FOR NEXT statement loops the main A variable from 1 to 5, but for every loop of A the FOR NEXT statement inside the first loop must also loop its variable B from 1 to 10. This is known as a nested loop as the loop in the middle is nested inside an outer loop. <BR>
<BR>
Such loops are especially useful for working on array data by using the variables tha