25 lines
906 B
Text
25 lines
906 B
Text
100 CLS : REM 100 HOME for Applesoft BASIC : REM DELETE line for Minimal BASIC
|
|
110 DATA -2,2,1,"Normal",-2,2,0,"Zero increment"
|
|
120 DATA -2,2,-1,"Increments away from stop value"
|
|
130 DATA -2,2,10,"First increment is beyond stop value"
|
|
140 DATA 2,-2,1,"Start more than stop: positive increment"
|
|
150 DATA 2,2,1,"Start equal stop: positive increment"
|
|
160 DATA 2,2,-1,"Start equal stop: negative increment"
|
|
170 DATA 2,2,0,"Start equal stop: zero increment"
|
|
180 DATA 0,0,0,"Start equal stop equal zero: zero increment"
|
|
190 FOR j = 1 TO 9
|
|
200 LET c = 0
|
|
210 READ s, f, i, t$
|
|
220 PRINT t$
|
|
230 PRINT " Bucle de "; s; "a "; f; " en incrementos de "; i
|
|
240 FOR v = s TO f STEP i
|
|
250 PRINT " Indice del bucle = "; v
|
|
260 LET c = c + 1
|
|
270 IF c <> 10 THEN 300
|
|
280 PRINT " Saliendo de un bucle infinito"
|
|
290 GOTO 310
|
|
300 NEXT v
|
|
310 PRINT " Bucle terminado"
|
|
320 PRINT
|
|
330 NEXT j
|
|
340 END
|