Listing A Program - Star Micronics Rainbow NX-1000C User Manual

Table of Contents

Advertisement

1
1
I
I
I
I
J
I
Pf': I NT SAMPLE
THE SQUARE ROOT OF 1000 IS 31.6227766
:'BYE
If you change line 10 to OPEN 144,4, change PRINT#4 in lines 20 to
60 to PRINT#144, and change line 70 to CLOSE 144, the output will be
double spaced because the logical file number is greater than 127. If you
change line 10 to OPEN 4,4, 7 the lower-case letters ofthe business character
set will be used (provided DIP switch 5 is ON).
To see the output you will have to scroll the paper by setting the printer
off-line and pressing the Paper Feed switch. If you like, you can add a line
to the program that will do this job for you by printing ten blank lines.
The following loop will do the trick:
65 FOR 1=1 TO 10 :PRINT*4 :NEXT I
Similar lines can be added to the other sample programs in this chapter
if you wish.
LISTING A PROGRAM
Normally, when given the LIST command the computer displays a
program listing on the CRT screen. If you want a printed listing you must
redirect output from the screen to the printer by opening the printer again,
then typing a CMD statement. The syntax of the CMD statement is:
CMD lfn [, data)
I
Ifn
The logical file number assigned in the OPEN statement.
I
I
J
data Variables, character strings, or numeric data to be printed at the be-
ginning of the output.
Try listing the program currently in memory on the screen. Then type
the following sequence of commands and verify that you get an identical
printed list:
OPEN4.4
CMD4
LIST
PRINT*4
CLOSE4
29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents