Difference between revisions of "Format Your Words With This TEXT Aid"
(New page: With a little Basic help, your 100 can be a hot-shot word processor. By RICHARD RAMELLA Portable 100/September 1983 Page 27-28 ____ Though its text-handling capabilities are diverse, the M...)
|Line 76:||Line 76:|
Revision as of 20:22, 24 January 2009
With a little Basic help, your 100 can be a hot-shot word processor. By RICHARD RAMELLA Portable 100/September 1983 Page 27-28 ____ Though its text-handling capabilities are diverse, the Model 100's built-in, word-processing program lacks features needed by many wordsmiths. So I wrote TEXTHELPER, a fairly short basic program that formats printed documents in useful ways.
With this program, you may set side margins from 0 to 20, single-, double- or triple-space, and print page numbers, headers, and footers. The text is automatically printed in a spaced format so it continues from page to page with uniform margins at top and bottom. It is for use with standard 8 l/z-by-11 -inch paper.
And just to show you my heart's in the right place, I've thrown in a little routine that counts the words in a document.
FASTER THAN HAND. The format printing process occurs quite slowly by computer standards but still is perhaps 10 times faster than the human hand and unerring in following your instructions. Sophisticated and lightning quick word processing is on the horizon for the Model 100, but those programs you won't get for the cost of a few magazine pages.
The experts may want to skip ahead here, because I'm starting at the beginning for the many Model 100 owners just getting acquainted with their machine.
The Model 100 has several kinds of files. The two we'll deal with are text documents and Basic programs. The program TEXTHELPER is a Basic program. It calls up material in a text file and sends it to the line printer, which prints it on paper in the format you have determined.
What you need to know about creating a text file is in chapter eight (pages 43-60) of the manual that came with the computer. Once you are able to create a text file, write words in it, and save the file, you can use this program.
MENU MODE, In the menu mode, the text file you create will be followed by the file name extension .DO. Using TEXTHELPER, you may call up only .DO files for formatting.
Before you Run TEXTHELPER, there, must be a text file in the system, and you must know the exact name of it. This isn't difficult because you named the file when you created it.
A note of caution is warranted here. When you create the text file, make sure you don't use the tab key on your 100. And although your typing teacher may have taught you to leave two spaces between sentences, don't do it here. The results will be bizarre.
Let's say you want to format a file listed in the menu as MOM.DO. (It's a long overdue letter to your poor old gray-haired mother.)
This program is so user-friendly many experienced computer jockeys are going co be kicking out program lines left and right. But it protects the novice computer user from mistakes in numerous ways.
As the program begins, a two-item menu is shown. Type 1 and tap enter to try the word counter. Or type 2 and tap enter to try the document formatter. Tap anything else and you must try again until you get one of the two acceptable answers.
WORD COUNTER. If you try the word-counter routine, it asks for the name of the file to be accessed. The file name is MOM.DO, but you just type in the word MOM in any mix of upper and lower case, and the machine understands. The program displays WORDS: followed by a number that grows as each word is counted. When it's through counting, you know it because you're told Tap "M" to return to "MENU."
The document formatting pan of the program is more complex in its workings but not complex in use.
DECISIONS, DECISIONS. To format, you must make several decisions. I'll list them in turn: • You're asked what margin from 0 to 20 you wish. A choice less than zero or more than 20 is unacceptable. Paper sized at 8 1/2-by-ll inches will hold about 85 characters on a line. Note that 9 1/2-by-11-inch computer paper is actually 8 1/2 inches wide after you tear off the tractor-feed margins. If your line printer allows changing the width of letters, I advise you to set it at 10 characters per inch so 85 characters fit snugly between one edge and the other. Otherwise, this program may give you unintended results.
The number you choose for a left margin is exact but on the right it is approximate. Both are about the same, but the right margin allows a bit of grace. This is because the program doesn't go to the next line until it encounters a line feed or blank space occurring after passing the line length determined by the margins it passed. This prevents line feeds in mid-word.
• That brings us to the next choice. If you select a right margin of 10 and a left margin of 10, then you'll have a line with about 65 characters (85 minus 20) in it. The program tells you this and asks: "Is this okay?" If it isn't, type N for no and tap Enter.
You'll get another try at setting margins and may keep trying until satisfied. Answering Y for yes sends the program onward. • A menu for line spacing is shown. Your choices are 1 for single space. 2 for double space, and 3 for triple space. If you are printing a single-spaced document on a single page, it's better to use the print function included with the Model 100's text-processing program. Single-spaced text gives you 50 lines a page, double-spaced 25 lines, and triple-spaced 16 lines.
• Now choose your header. A header is just word-processing jargon for a title. You don't need a header on a letter to mom, but in other cases it's very useful: War and Peace — Fifth Draft... Annual Report... and the like. You are given a limit here for the number of characters you may put in the header. It's based on the number of characters in the formatted line. If your header is too long, you get a chance to write a shorter one. In fact, it's mandatory.
The header also includes three other interesting things: the date, the time, and the page number. These are provided automatically. I'm afraid that by including the exact time on each page, I've revealed exactly how slow this program can be - more than two minutes for a double-spaced page 65 characters wide.
• The final format choice is the footer. It goes below the final line on the page and approximately flush with the right of that line. A footer may say (MORE), (CONTINUED) or any other message you want on each page. Don't make It too long; if it is longer than the number of characters in your line, you may get an error message and a crashed program. Trusting you to follow this advice, I have not built in a rescue should your footer exceed the number of characters in the line.
GENTLE REMINDER. Now the program reminds you to turn on the printer and position the paper. On my ancient Line Printer III the paper is positioned if the top of the print head is even with the perforation across the top of the first fan-fold page on which I will he printing.
You may have to experiment for the best setting on your printer.On the same screen display as your final reminders are the words: "Enter name of text file to be formatted." In our hypothetical case, we type the word "mom" and stand back for some turtle-like formatted printing.
If your printer doesn't jam the first time you look away from it, you might go into the kitchen for milk and cookies while it does its work. You can get pretty bored watching this program run - even when it's printing your own deathless words.
100 REM*TEXTHELPER* 101 REM*TRS-80 Model 100* 102 REM*ByRichardRomella* 110 CLS 120 PRtNT"Menu:" 130 PRINTSTRING$(24,"-") 140 PRINT"1-Word Counter" 160 PRINT"2-DocumentFormatter" 170 PRINTSTRING$(24,"-") 180 INPUT"Number of your choice";A 190 IFA<>1ANDA<>2THENCLS :PRINT"Choiceslimitedlo..." :GOTO120 200 CLS :H=0 :P=0 210 IFA=2THEN340 220 REM*WordCountRoutine*