EasyManua.ls Logo

Commodore 2031 - Page 39

Commodore 2031
98 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Where: lfn = a file previosly opened using secondary address 15
"commandstring" = disk handling or disk file handling commands. These disk
commands are discussed in detail in Chapter 3 of this
manual.
PRINT# may also be used to transmit data to previously-opened sequential or
relative file. A semicolon must be used as a terminator for each PRINT# state-
ment when using BASIC 3.0 to avoid sending extraneous line feeds to the
diskette. These characters are written to the diskette by the BASIC PRINT#
routine as part of the data terminator. It is important to be aware of this fact
because the carriage return alone is seen as a terminator by the DOS. The line
feed is then stored in the file as the first character in the next record. To avoid
this, use the following format:
Example: PRINT#2,"JONESABC";CHR$(13);
The CHR$(13) is the carriage return necessary for the proper termination of the
record on the disk. When this record is input, the result will be JONESABC
which is the desired result.
BASIC 4.0 users do not need to follow this procedure (though no harmful effects
will result from it). In BASIC 4.0, any file opened with lfn less than 128 will
automatically suppress the line feed.
The following format may then be used:
PRINT#lfn,A$
This will produce the desired value of A$ for the record, and will not interfere
with the next record.
Several variables may be written to the disk at the same time.
The format:
PRINT#lfn,A$,B$,C$
will result in a single variable (A$+B$+C$) being retrieved by the input
command.
The format:
PRINT#lfn,A$CHR$(13)B$CHR$(13)C$
will result in the variables A$, B$, and C$ being separated by carriage returns,
and they may then be input as separate variables.
35

Table of Contents

Other manuals for Commodore 2031

Related product manuals