MIN THEN, 310FOR L=1 TO N, 100NEXT J: PRINT, 320C=C+1: A(C)=X, 330NEXT L: X=1-X, 300 FOR K=0 TO MAX-N, 290 LPRINT CHR$(27)"2": END, 340 NEXT K: PRINT N;: RETURN, Variable, Table 14-1.Variables for SYMMETRY"> Epson FX Purpose, 90IF N>MIN THEN, 310FOR L=1 TO N, 100NEXT J: PRINT, 320C=C+1: A(C)=X, 330NEXT L: X=1-X, 300 FOR K=0 TO MAX-N, 290 LPRINT CHR$(27)"2": END, Variable

 

Table 14-1. Variables for SYMMETRY

 

 

 

 

Variable

 

Purpose

A

 

Array

C

 

Counter of array elements

DOT

 

Counter of dots; used to calculate P

H

 

Highest number used in calculating P

J

 

Loop counter

K

 

Loop counter

L

 

Loop counter

LAST

 

Last pass of the print head

MAX

 

Maximum number for the pattern

MIN

 

Minimum number for the pattern

N

 

Number of pins in the current pattern

N1

 

Length of the graphics line

N2

 

Length of the graphics line

P

 

Pin firing pattern

P0

 

Reverse pattern of P

 

PASS

 

Number of the current pass

R

 

Remainder

RE

 

Number of repeats of the pattern

X

 

0 or 1 to fill the array

90IF N>MIN THEN 70100NEXT J: PRINT

The J loop will Repeat four times (RE = 4). It has two subloops, each of which depends on the value of N. Each time through the first loop (lines 40 to 60), N increases by one-to the value of MAX. Each time through the second loop (lines 70 to 90), N decreases by one-to the value of MIN. For each value of N, the program calls subroutine 300, and each time it is called, this subroutine adds more ones and zeros into the array.

Enter the program lines for the subroutine by typing:

290 LPRINT CHR$(27)"2": END300 FOR K=0 TO MAX-N310FOR L=1 TO N320C=C+1: A(C)=X330NEXT L: X=1-X340 NEXT K: PRINT N;: RETURN

190