Epson MX-70 User Manual - Page 36

The Form Feed - in Basic Software, Time Out for Controlled Confusion

Page 36 highlights

Chapter 3 The Form Feed - in Basic Software Let's modify our program to print only 10 lines, then have it automatically roll the paper up to the next TOE CHR$ (12) means "Feed Form to TOF." Make the program read: 9 PR #1 20 FOR N = 1 TO 1 0 3 0 PRINT N 40 NEXT N 45 PRINT CHR$(12) 49 PR #0 and RUN. (Apple) (TRS use 12+128=140) (Apple) CURSES! (the villain said). We overshot the top of the next form by one lousy line. Did you look at it? What went wrong? All we added was a simple Form Feed in line 45. Where did that extra line feed come from? Hmmmm? (Knit 1, Pearl 2.) That's right! Every PRINT statement automatically sends a Line Feed to the printer. We forgot to include a trailing semicolon in Line 45 to surpress it. Sounds simple enough. Let's change Line 45 to: 45 PRINT CHR$(12); and RUN again. Time Out for Controlled Confusion We are genuinely on the horns of a dilemma. Since the Apple PR#0 disconnects the printer before the final Line Feed form line 45 is executed, Apple users are seeing different results than everyone else and are wondering what all the shouting is about. They don't see any problem, but for the wrong reason! Apple users replace PR#0 in line 49 with END, then RUN and see what happens. Get the idea, now? It overshot by one line again. 26

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107

Chapter 3
The Form Feed - in Basic Software
Let’s modify our program to print only 10 lines, then have it automatically roll
the paper up to the next TOE CHR$ (12) means “Feed Form to TOF.”
Make the program read:
9 PR #1
20
FOR N =
1
TO
10
30
PRINT
N
40
NEXT N
45 PRINT CHR$(12)
49
PR #0
(Apple)
(TRS use 12+128=140)
(Apple)
and RUN.
CURSES! (the villain said). We overshot the top of the next form by one lousy
line. Did you look at it?
What went wrong? All we added was a simple Form Feed in line 45. Where did
that extra line feed come from? Hmmmm? (Knit 1, Pearl 2.)
That’s right! Every PRINT statement automatically sends a Line Feed to the
printer. We forgot to include a trailing semicolon in Line 45 to surpress it.
Sounds simple enough. Let’s change Line 45 to:
45 PRINT CHR$(12);
and RUN again.
Time Out for Controlled Confusion
We are genuinely on the horns of a dilemma.
Since the Apple PR#0 disconnects the printer
before
the final Line Feed form
line 45 is executed, Apple users are seeing different results than everyone else
and are wondering what all the shouting is about. They don’t see any problem,
but for the wrong reason!
Apple users replace PR#0 in line 49 with END, then RUN and see what
happens.
Get the idea, now? It overshot by one line again.
26