Printer Friendly

Using a word processor to write programs.

It always surprises me to see articles by talented laboratorians describing the use of commercial microcomputer software or professional programmers in situations where they could just as easily write their own programs. In fact, MLO's August and September Computer Dialog columns came out foursquare in favor of buying general purpose software and against developing BASIC programs.

True, microcomputer software packages like Multiplan, Lotus 1-2-3, Scholar/Teach 3, and Visi-Calc are powerful and flexible programs. But that means they do a great deal more than most users really require. They are also expensive, and it takes a lot of time to learn all their functions.

As for turning software development over to an expert, the trouble is that a professional programmer may not fully comprehend the needs of the laboratory. Or the programmer may not be available later when you need help.

If you want the microcomputer to perform special calculations, issue interpretations of results, or display case studies for staff and students, you can write the program. It's not that difficult.

Why do obviously bright people shy away from programming? The main stumbling block is the boring and repetitive nature of the task.

The microcomputer is incredibly stupid when it comes to receiving instructions. Every command must be properly spelled, punctuated, and numbered or a frustrating "SYNTAX ERROR" message will appear. Nothing turns off an amateur programmer faster than a few "SYNTAX ERROR" messages in a program he or she worked so hard to write.

You can produce your own software with only a rudimentary knowledge of BASIC and one store-bought program for word processing. I use an Apple II Plus microcomputer and the Apple-writer II word processor (which turns the computer into a typewriter with a memory) to write and edit all my BASIC programs.

Word processors have editing abilities that seem miraculous to the new user. Some also can convert their ASCII text files into "soft" files that may be transmitted to other types of computers via a modem. ASCII is a standard format for data interchange. So you could write programs at home on an IBM personal computer and send them through a modem to an Apple or even a minicomputer in the laboratory.

Applewriter II is a very versatile processor with a glossary function allowing storage and recall of text strings of up to 128 characters by means of a few keystrokes. Other word processors have similar functions.

The control command CTRL-G and a single character designating a particular string enable you to reproduce simple or complex commands from the glossary. It's a quick, error-free way to insert constantly repeated commands into a program you are writing.

The following command string might recur throughout a case simulation program: VTAB 12: HTAB 5: INVERSE: PRINT "THAT'S CORRECT"; N$: NORMAL: GOTO. The vertical and horizontal tab instructions at the beginning of the string position the message "That's correct" on the computer screen. "INVERSE" means the message will be shown in dark letters against a light background, the reverse of a normal display. "N$" adds the student's first name to the message. "NORMAL" restores the screen's dark background, and "GOTO" continues the program by directing the flow to another line in the program.

If this command string is in a glossary preceded by a code character, 1, it can then be placed in the program merely by holding the CTRL key and pressing G, which enters the glossary function, and then typing the character 1. Applewriter will save the glossary as an independent text file so that you can use it in other programs and add to it as your skills improve.

Writing the listing, or series of lines that make up a program, is not at all difficult. Just use the word processor normally. Begin each program line with a number, proceeding in increments of 10. You can leave blanks for later numbering, and you also can amend the numbering. Do not exceed 256 characters per line, and end every line with a carriage return. This insures that the next line will be read as a new line, not as an extension of the previous one.

The listing is saved by the word processor as a standard Apple ASCII text file. In order to execute the text file into a BASIC program, you must leave the word processor and use the Applesoft language. Applesoft is located in ROM (read only memory) and will automatically become available when you exit the word processor. During execution (type in EXEC and the file name), the listing will be interpreted line by line until the Applesoft prompt reappears, indicating the computer is ready to accept commands.

"SYNTAX ERROR" messages may appear during execution, most likely because a line was not numbered or a carriage return was omitted. These messages rapidly scroll off the screen as the computer reads the listing.

By typing in a RUN command, you get the computer to carry out the program. If there are errors, Applesoft messages will now tell you where they are. If the program is free of flaws, it will run through to completion.

Save the new program by typing SAVE and a file name. As a word processor text file, it might be called TEST; as an Applesoft file you can name it TEST 1.1.

Suppose you have an Applesoft program, acquired from someone else or written by you, that you want to edit or append to another program. Convert that program into a standard Apple text file with the preliminary commands shown in Figure I. The program will be written to your file diskette as a text file using the file name selected. Your word processor will be able to access this file and permit you to change it.

To convert the file back to an Applesoft program, execute it from the Applesoft BASIC environment and save the program under a modified name.

This is a great way for Apple microcomputer users to reduce the time and efofrt required for BASIC programming. If you type as slowly as I do, the glossary function is especially welcome.

I'd like to hear from readers with different microcomputers as to whether my methods work on their systems. There are other techniques that simplify programmimg, and I may detail some of them in the future, but the point is that it's not hard to do it yourself.
COPYRIGHT 1984 Nelson Publishing
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 1984 Gale, Cengage Learning. All rights reserved.

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:software development for the medical laboratory
Author:Mroz, Richard C., Jr.
Publication:Medical Laboratory Observer
Article Type:column
Date:Oct 1, 1984
Previous Article:'Press the space bar to learn about nematodes.' (computer-assisted lessons for your laboratory)
Next Article:Medical technology: career or stepping stone?

Related Articles
Word processing with a microcomputer.
Tips on buying microcomputer hardware and software.
The VA computer system goes on line.
In-house software monitors and projects costs.
A program to prepare Levey-Jennings charts with integrated software.
Developing software for management applications.
Use of a spreadsheet for method evaluation statistics.
Personal computers in the lab: what will the future bring?
Using artificial intelligence in the laboratory.
A PC buyer's primer.

Terms of use | Copyright © 2016 Farlex, Inc. | Feedback | For webmasters