Use the For Loop to execute a set of statements repeatedly for specific number of times. The counted loop uses a variable to hold the iteration count. This commences at the start value for the loop is automatically incremented by a step value for each iteration. Once it has passed the end value, the loop terminates.
Example
FOR COUNTER = 1 TO 10
CRT "TEMENOS GLOBUS" ;*The string TEMENOS GLOBUS will get printer 10 times
NEXT COUNTER
No comments:
Post a Comment