MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

Line justifier (Rainbow 1981-08): Difference between revisions

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
(Created page with "Last month we said that we'd have a line Justification program ready for this month's issue. The listing is included below. We were writing the RAINBOW last month with a sim...")
 
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{NavRainbow1981-08}}
Last month we said that we'd have a line Justification program ready for this month's issue.  The listing is included below.
Last month we said that we'd have a line Justification program ready for this month's issue.  The listing is included below.


We were writing the RAINBOW last month with a simple word processor that let us enter a whole line and make corrections before it was. committed to the print buffer on a printer. That was an improvement over the program that the manual had, mainly because it allowed us to backspace for corrections. In the case or the RAINBOW, where we want to have lines which are right-justified, that wrorked only to a degree -- mainly because we had to type the line and then go back and add spaces to make the lines come out even on the right-hand side. While the was easier than typing the RAINBOW on a typewriter (which would have required two typings) it was still a hassle. Thus was born the (mini word processor below.
We were writing the RAINBOW last month with a simple word processor that let us enter a whole line and make corrections before it was committed to the print buffer on a printer. That was an improvement over the program that the manual had, mainly because it allowed us to backspace for corrections. In the case or the RAINBOW, where we want to have lines which are right justified, that wrorked only to a degree -- mainly because we had to type the line and then go back and add spaces to make the lines come out even on the right hand side. While the was easier than typing the RAINBOW on a typewriter (which would have required two typings) it was still a hassle. Thus was born the mini word processor below.


What happens here is that, using the INSTR Command, we search for spaces in a line and then "peel off" spaces from the end or each line and add them to the spaces which are already between the words. Each line is entered as A$ and then pulled apart. Spaces are inserted, and then the line is put back together. There are two variations, one for a full-length line and the other for a half-length one.
What happens here is that, using the INSTR Command, we search for spaces in a line and then "peel off" spaces from the end of each line and add them to the spaces which are already between the words. Each line is entered as A$ and then pulled apart. Spaces are inserted, and then the line is put back together. There are two variations, one for a full-length line and the other for a half-length one.


The program requires the typist to space to a certain spot on the line, in effect, to fill up the line with spaces (a printer might call these space bands). Those spaces are then repositioned in the line to make it come out evenly.
The program requires the typist to space to a certain spot on the line, in effect, to fill up the line with spaces (a printer might call these space bands). Those spaces are then repositioned in the line to make it come out evenly.
Line 11: Line 12:
As an added aid, the last line typed is shown on the bottom of the screen. One of the reasons for this is because we felt it would be easier for the typist to begin the next line knowing what was on the previous line — without the need of having to look at the printer.
As an added aid, the last line typed is shown on the bottom of the screen. One of the reasons for this is because we felt it would be easier for the typist to begin the next line knowing what was on the previous line — without the need of having to look at the printer.


For short lines, Just hit ENTER when the line ends. However, a bug ray — but will not always -- appear if you. type a VERY short line. What can happen is that the one or two words in the line will repeat themselves. If that does occur, just space down and retype the same line. It will go away.
For short lines, Just hit ENTER when the line ends. However, a bug ray — but will not always -- appear if you type a VERY short line. What can happen is that the one or two words in the line will repeat themselves. If that does occur, just space down and retype the same line. It will go away.
 
The remainder of the program is devoted to the display and the graphic signature for the program and the software.
 
[[File:Falsoft Mini Word Processor.png]]
 
==Notes:==
Transcriber's note: It only captures the line and prints it, I can't understand why the 2-line version is smaller, the one-line version fits 80 characters (2 lines and a half screen, 15 + 64 = 79)
 
==THE LISTING......==
<pre>10 CLS
20 CLEAR1000
30 GOSUB410
40 GOSUB380:GOSUB390:GOSUB400:PRINTSTRING$(32,45)
30 PRINT:PRINT"SELECT MODE:"
60 PRINT"      (1) ONE-COLUMN FORMAT":PRINT"      (2) TWO-COLUMN FORMAT":PRINT:INPUT"      ENTER HUMBER";ZZ
65 ON ZZ GOTO100,240
70 PRINT:INPUT "ENTER ONLY 1 OR 2 PLEASE";ZZ
80 ON ZZ GOT0100,240
90 IF ZZ<>1 OR ZZ<>2 THEN 70
100 CLS
110 N$=" ":L=4
120 GOSUB380:GOSUB390: GOSUB400:PRINT"      ONE-COLUMN FORMAT"
130 PRINT@160, STRING$(32,45);:PRINT@271,CHR$(128);"<--SPACE TO HERE":PRINT@288,STRING$(32,45);:PRINT@322,"  ...LAST LINE...":PRINTA$:PRINT@192,"";:LINE INPUTA$
140 IF RIGHT$(A$,1)="" THEN A$=RIGHT$(A$,1):A$=LEFT$(A$,79):GOTO170
150 PRINT#-2,A$
160 GOTO100
170 B=INSTR(L,A$,N$)
180 C$=LEFT$(A$,B)
190 E$=RIGHT$(A$,79-B)
201 D$=C$+N$
210 A$=D$+E$
220 L=LEN(D$)+4
230 GOTO140
240 CLS
250 N$=" ":L=4
260 GOSUB380:GOSUB390:GOSUB400:PRINT"        TWO-COLUMN FORMAT"
270 PRINT@160,STRING$(32,45):PRINT@230,CHR$(128);"<--SPACE TO HERE":PRINT@256,STRING$(32,45);:PRINT@320,"  ...LAST LINE...":PRINTA$:PRINT@192,"";:LINE INPUT A$
280 IF RIGHT$(A$,1)=" " THEN A$=RIGHT$(A$,1):A$=LEFT$(A$,37):GOTO310
290 PRINT#-2,A$
300 GOTO240
310 B=INSTR(L,A$,N$)
320 C$=LEFT$(A$,B)
330 E$=RIGHT$(A$,37-B)
340 D$=C$+N$
330 A$=D$+E$
360 L=LEN(D$)+3
370 GOTO280
380 F1$=CHR$(129)+CHR$(131)+CHR$(133):F2$=CHR$(132)+CHR$(141):F3$=CHR$(133):F4$=CHR$(128+15):RETURN
390 CLS:PRINT@34,F1$: PRINT@66,F2$:PRINT@98,F3$:RETURN
400 PRINT@99,"ALSOFT MINI -WORD PROCESSOR":RETURN
410 PRINT@198,"(C) FALSOFT, 1981":FORX=1TO200:NEXT
420 GOSUB380
430 FORX=376TO34STEP-32:GOSUB460:NEXTX
440 FORX=51TO34STEP-1:GOSUB460:NEXTX
430 RETURN
460 Y=X+32:Z=Y+32:Q=Z+32
470 PRINT@X,F1$:PRINT@Y,F2$:PRINT@Z,F3$:PRINT@Q,F4$:RETURN
</pre>
 
==Links==
[https://archive.org/details/rainbowmagazine-1981-08/page/n0 See Rainbow Magazine 1981-08 Pag 1, in archive.org]<br>
Virtual disk with programs from (Rainbow 1981-08): [[File:1981-08.dsk]]
[[Category:Word Processing]]

Latest revision as of 23:13, 4 November 2020

WELCOME
Looking for CoCo help? If you are trying to do something with your old Color Computer, read this quick reference. Want to contribute to this wiki? Be sure to read this first. This CoCo wiki project was started on October 29, 2004. --OS-9 Al

See Recent Changes. | About this site. | Join the E-Mail List or Facebook Group. | Contact me with updates/questions.

This page was last updated on 11/4/2020. Total Pages: 744. Total Files: 994.


Home / Publications / Rainbow / Rainbow 1981 / Rainbow 1981-08 - Line justifier (Rainbow 1981-08)


Last month we said that we'd have a line Justification program ready for this month's issue. The listing is included below.

We were writing the RAINBOW last month with a simple word processor that let us enter a whole line and make corrections before it was committed to the print buffer on a printer. That was an improvement over the program that the manual had, mainly because it allowed us to backspace for corrections. In the case or the RAINBOW, where we want to have lines which are right justified, that wrorked only to a degree -- mainly because we had to type the line and then go back and add spaces to make the lines come out even on the right hand side. While the was easier than typing the RAINBOW on a typewriter (which would have required two typings) it was still a hassle. Thus was born the mini word processor below.

What happens here is that, using the INSTR Command, we search for spaces in a line and then "peel off" spaces from the end of each line and add them to the spaces which are already between the words. Each line is entered as A$ and then pulled apart. Spaces are inserted, and then the line is put back together. There are two variations, one for a full-length line and the other for a half-length one.

The program requires the typist to space to a certain spot on the line, in effect, to fill up the line with spaces (a printer might call these space bands). Those spaces are then repositioned in the line to make it come out evenly.

The screen display is set up so that there is a little black block for the typist to "aim" at. Once the typist gets close to the block, he or she just spaces in blanks until the cursor covers the black block. Then, the line is entered into the print buffer and printed on the line printer.

As an added aid, the last line typed is shown on the bottom of the screen. One of the reasons for this is because we felt it would be easier for the typist to begin the next line knowing what was on the previous line — without the need of having to look at the printer.

For short lines, Just hit ENTER when the line ends. However, a bug ray — but will not always -- appear if you type a VERY short line. What can happen is that the one or two words in the line will repeat themselves. If that does occur, just space down and retype the same line. It will go away.

The remainder of the program is devoted to the display and the graphic signature for the program and the software.

Notes:

Transcriber's note: It only captures the line and prints it, I can't understand why the 2-line version is smaller, the one-line version fits 80 characters (2 lines and a half screen, 15 + 64 = 79)

THE LISTING......

10 CLS
20 CLEAR1000
30 GOSUB410
40 GOSUB380:GOSUB390:GOSUB400:PRINTSTRING$(32,45)
30 PRINT:PRINT"SELECT MODE:"
60 PRINT"      (1) ONE-COLUMN FORMAT":PRINT"      (2) TWO-COLUMN FORMAT":PRINT:INPUT"       ENTER HUMBER";ZZ
65 ON ZZ GOTO100,240
70 PRINT:INPUT "ENTER ONLY 1 OR 2 PLEASE";ZZ
80 ON ZZ GOT0100,240
90 IF ZZ<>1 OR ZZ<>2 THEN 70
100 CLS
110 N$=" ":L=4
120 GOSUB380:GOSUB390: GOSUB400:PRINT"      ONE-COLUMN FORMAT"
130 PRINT@160, STRING$(32,45);:PRINT@271,CHR$(128);"<--SPACE TO HERE":PRINT@288,STRING$(32,45);:PRINT@322,"   ...LAST LINE...":PRINTA$:PRINT@192,"";:LINE INPUTA$
140 IF RIGHT$(A$,1)="" THEN A$=RIGHT$(A$,1):A$=LEFT$(A$,79):GOTO170
150 PRINT#-2,A$
160 GOTO100
170 B=INSTR(L,A$,N$)
180 C$=LEFT$(A$,B)
190 E$=RIGHT$(A$,79-B)
201 D$=C$+N$
210 A$=D$+E$
220 L=LEN(D$)+4
230 GOTO140
240 CLS
250 N$=" ":L=4
260 GOSUB380:GOSUB390:GOSUB400:PRINT"        TWO-COLUMN FORMAT"
270 PRINT@160,STRING$(32,45):PRINT@230,CHR$(128);"<--SPACE TO HERE":PRINT@256,STRING$(32,45);:PRINT@320,"   ...LAST LINE...":PRINTA$:PRINT@192,"";:LINE INPUT A$
280 IF RIGHT$(A$,1)=" " THEN A$=RIGHT$(A$,1):A$=LEFT$(A$,37):GOTO310
290 PRINT#-2,A$
300 GOTO240
310 B=INSTR(L,A$,N$)
320 C$=LEFT$(A$,B)
330 E$=RIGHT$(A$,37-B)
340 D$=C$+N$
330 A$=D$+E$
360 L=LEN(D$)+3
370 GOTO280 
380 F1$=CHR$(129)+CHR$(131)+CHR$(133):F2$=CHR$(132)+CHR$(141):F3$=CHR$(133):F4$=CHR$(128+15):RETURN
390 CLS:PRINT@34,F1$: PRINT@66,F2$:PRINT@98,F3$:RETURN
400 PRINT@99,"ALSOFT MINI -WORD PROCESSOR":RETURN
410 PRINT@198,"(C) FALSOFT, 1981":FORX=1TO200:NEXT
420 GOSUB380
430 FORX=376TO34STEP-32:GOSUB460:NEXTX
440 FORX=51TO34STEP-1:GOSUB460:NEXTX
430 RETURN
460 Y=X+32:Z=Y+32:Q=Z+32
470 PRINT@X,F1$:PRINT@Y,F2$:PRINT@Z,F3$:PRINT@Q,F4$:RETURN

Links

See Rainbow Magazine 1981-08 Pag 1, in archive.org
Virtual disk with programs from (Rainbow 1981-08): File:1981-08.dsk