Diamond Pattern - Epson FX Series User Manual

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

Advertisement

a big difference the line spacing makes? All of the
See what
multiple-line graphics programs in this manual use this line spacing.

Diamond pattern

In this next and final version of the program, you exercise even
more control over the slashes. This program varies not only their
direction, but also their sizes (length and height) on the print line.
Although the program still uses only one subroutine, it prints 24
different patterns, 12 on each of the 2 print lines. The differences in the
patterns are achieved by IF-THEN tests in a subroutine.
To get the final listing, add line
80,90, and 120:
10 LPRINT CHR$(27)"1"
20 FOR L=l TO 2
30 FOR J=0 TO 1
40 LPRINT CHR$(27)"K"CHR$(27)CHR$(@);
50 GOSUB 80
60 NEXT J: LPRINT: NEXT L
70 LPRINT CHR$(27)"@": END
80 FOR X=1 TO 6: Y=X: IF J=l THEN Y=7-X
90 FOR Z=0 TO Y: N=Z: IF J=l THEN N=Y-Z
100 IF L=2 THEN N=7-N
110 LPRINT CHR$(2^N);
120 NEXT Z: NEXT X: RETURN
If you didn't watch the printing when you ran this program, the
printout may not make it obvious that there are two lines of print-
but there are. The first line prints slashes by moving from bottom to
top and then from top to bottom, whereas the second line prints the
slashes first from top to bottom and then from bottom to top.
And how do the IF-THEN statements fit into the picture? The one in
line 80 changes the length of the slashes. The one in line 90 controls the
direction and height. The IF-THEN in line
a mirror image of the top.
and change lines
100
100
10, 30, 40, 50,
makes the bottom row
141

Hide quick links:

Advertisement

Chapters

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents