Printing The Array Contents; Pattern Sets - Epson FX Series User Manual

Fx series printer
Hide thumbs Also See for FX Series:
Table of Contents

Advertisement

Line
in the L loop stores the ones and zeros in the array. The end of
320
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=l TO C: LPRINT A(K);: NEXT K:
LPRINT.. LPRINT "C="C
and RUN your growing program. Figure
lines of the result:
1
0
1
0
1
1
0
1
1
1
0
0
1
0
1
0
0
0
0
1
0
0
1
Figure 14-1. Printing the array contents
Your entire printout is 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
four sets of 2, three sets of 3, . . . as shown in Figure
1,
Before proceeding, delete line 5 and modify line
to the screen instead of to the printer:
110 FOR K=l TO C: PRINT A(K);: NEXT K:
PRINT'. PRINT "C =" C
0
1
0
0
1
0
0
0
1
1
0
0
1
1
1
0
1
0
0
1
1
1
1
1
l
Figure 14-2. Pattern sets
14-1
1
1
0
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
0
1
1
0
0
0
shows the first seven
0
1
1
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
1
1
0
0
1
1
1
14-2.
so that it prints
110
0
0
0
0
0
1
191

Hide quick links:

Advertisement

Chapters

Table of Contents
loading

This manual is also suitable for:

Fx-100Fx-80Fx-185 - impact printer

Table of Contents