The C For statement clarified and Dotwriter 4.0. (Tandy gram) (column) Jake Commander.
The C FOR statement clarified and Dotwriter 4.0
Well I put my foot in it didn't I! In my enthusiasm to compare C with Basic, I went a little too far, and my face is red this month. What happened was that when I compared the FOR statement in Basic with the for statement in C, I demonstrated a parallel between the languages that doesn't exist in quite the way I described. What I did wrong was to illustrate a for loop in C which was supposed to end when a specified condition became true. In fact, the opposite is true; a for loop executes in C while the specified condition is true and then terminates when it becomes false.
Please accept my apologies for that blunder. I'm only a human programmer, subject to the same Murphy's law faced by all programmers. The most curious aspect of my mistake is that when I wrote the example, I had already incorporated the for statement in my C compiler which worked exactly as per the book.
That's what you get for talking in C and thinking in Basic. The erroneous example I gave:
for(x = 1;X = = 10;x = x + 1)
should have read:
for(x = 1;x < = 10;x = x + 1)
The second (correct) statement directs the for loop to continue while x is less than or equal to ten, thus cycling x from one to ten. The first statement taken literally directs the loop to execute while x is equal to ten which it can never be as it is initialized to one and never incremented, as the loop is never entered. Perhaps my blunder will make that point clearer to those of you still wary of C. As for myself, I'll never use a for loop again as long as I live.
I did receive some scolding mail on that subject which also attempted to convince me that some of my other examples were silly. As examples though, they were meant only to illustrate the ease with which I think a Basic programmer can learn C. They were not meant to be particularly elegant pieces of C programming. In particular in the above example, the x = x + 1 (which is familiar enough to Basic programmers) can be written in C as x + +, or x + = 1 or as I chose to illustrate, x = x + 1. In the context of that example, they would all increment x by one. So no more letters from C purists please. I'll try to convince Basic programmers in my own way, thank you.
As a final note on the subject of C, I recently noticed that Alcor Systems has a fully implemented C compiler for the Models 1/3/4 which they are selling for $89.95 (currently marked down from $250). This is a good price for a full C compiler. With any luck, I'll have a copy to review in this column soon.
In the meantime, if you can't wait, you can get Alcor Systems at 1132 Commerce, Richardson, TX 75081. Naturally you'll remember to tell them you heard it here won't you?
Speaking of reviews, that's what the rest of this month's column is: a quick overview of Dotwriter 4.0 for the Models 1/3/4/. This is published by Prosoft, Box 560, North Hollywood, CA 91603, a company that has been around for a long time by TRS-80 standards --they have seen quite a few other companies come and go over the last few years.
Prosoft has quite a few products for the Models 1, 3 and 4 which include a word processor Allwrite (which takes up where their previous Newscript left off) and a sideways printing utility for printing out frighteningly long spread-sheets. They also sell downloadable font disks for the Radio Shack DMP 2100P and the Epson LQ-1500 printers. (These fonts are separate from the fonts available with the Dotwriter package.)
A couple of years ago I had the opportunity to review Dotwriter 3.0 and its sister utility, GEAP--graphics editor and programer. It was a splendid package back then, and I'm pleased to see that not only did it stand the test of time but it has been substantially enhanced. These days, Dotwriter is written entirely in machine code (it used to be a Basic/machine code hybrid). The same is true for GEAP and both programs have new monikers. Dotwriter 3.0 is now Dotwriter 4.0, and GEAP is TGEAP, now a part of the Letterset Design System (LDS) which lets you design your own graphics and typefaces.
If you hurry with the utmost haste, you can upgrade your old versions for quite reasonable prices. For first-time buyers, Dotwriter 4.0 complete with 14 fonts is $79.95 for Models 1/3 and $99.95 for the Model 4. Extra font disks containing from three to 12 fonts are $24.95, and the Letterset Design System comes at $39.95.
If you buy Dotwriter 4.0 as a first-time user, you are in for some tremendous fun; you can go absolutely bananas with character sets on your printer. What you get is a package that allows you to print out your word processing files using fonts which come on separate disks. If you have ever browsed through a Letraset manual and admired all those typefaces--the fancy, the slick, the austere, the chic, even the crazy ones--this is your chance to produce some stylized text with your own humble and previously untapped TRS-80. All you need is a disk-based Model 1, 3, or 4 and a printer capable of dot graphics. Each letterset disk is capable of supporting both 7-bit (Microline and Radio Shack DMP series) and 8-bit (Epson and C-Itoh) graphic printers.
How would you like to choose from over 230 different typefaces? With up to 35 letterset disks, Dotwriter 4.0 lets you do just that. Now when you decide to send a letter to the President, you can print it in Americana or July 4th and appear ultra-patriotic. A look at the examples will convince you that no president could fail to be impressed by such panache.
Not only does Dotwriter 4.0 let you choose from many fonts, it lets you experiment with variations like double-width, double-strike, and emphasized printing. You can also change the magnification of characters or select proportional spacing. You can even do kerning (make the curly bit of a descender stretch under the preceding character for example.) In combination with the number of available fonts, the number of possible typestyle permutations becomes staggering. In fact, Prosoft has even found it necessary to print their own letterset reference catalog--just like a Letraset catalog--which by way of final proof was produced with Dotwriter.
It is a piece of cake to take advantage of all this textual flexibility. Dotwriter has a set of 65 commands which you simply embed in your text. You don't need a special word processor-- your regular one will do. To invoke the Dotwriter commands, you simply precede the two letters representing each one with a dot. When Dotwriter is subsequently used to print out the text, it senses these commands and acts accordingly. For example, .BF CORRAL would tell Dotwriter to begin using a font with a filename of CORRAL, .CE ON would cause automatic centering of printed text.
Over two years ago, when I first reviewed this software, I decided Dotwriter 3.0 was one of my favorite TRS-80 programs. A couple of years and a couple of hundred typefaces later, Dotwriter 4.0 keeps that torch burning.
Photo: A sampling of Dotwriter 4.0 print styles shown actual size, from top to bottom: July 4, Circus, City, Bells, Cameo, Corral, and 3D Corral magnified 3 times.