Epson FX-185 User Manual - Page 208
Lprint Chr$27qchr$44, For K=1 To C: Lprint Ak;: Next K, Lprint, Lprint C=c
View all Epson FX-185 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 208 highlights
Line 320 in the L loop stores the ones and zeros in the array. The end of line 330 makes X alternate between zero and one. To print out the contents of the array at this point, type: 5 LPRINT CHR$(27)"Q"CHR$(44) 110 FOR K=1 TO C: LPRINT A(K);: NEXT K: LPRINT: LPRINT "C="C and RUN your growing program. Figure 14-1 shows the first seven lines of the result: Figure 14-1. Printing the array contents Your entire printout s just a one-line array; the ones and zeros wrap around when they meet the temporary right-margin that you set in line 5. This program shows how FOR-NEXT loops can use variables to create patterns. The overall pattern gets made up of five sets of pattern 1, four sets of 2, three sets of 3, . . . as shown in Figure 14-2. Figure 14-2. Pattern sets Before proceeding, delete line 5 and modify line 110 so that it prints to the screen instead of to the printer: 110 FOR K=1 TO C: PRINT A(K);: NEXT K: PRINT' PRINT "C = "C 191