Tandy 1000 Basic Reference Manual page 278

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10 I BASIC Keywords
PRINT#
Statement
PRINT# buffr,[USING
format] data[,data,
...I
Writes data items to
a
sequential disk file.
Buffer is the number assigned to the file when you opened it.
When you first open a file for sequential output, BASIC sets a
pointer to the beginning of the file-that
is where PRINT#
starts writing the data items. At the end of each PRINT# opera-
tion, the pointer advances so that data items are written in
sequence.
A PRINT# statement creates a disk image similar to the image
a PRINT to the display creates on the screen. For this reason, be
sure to delimit the data so that it will be input correctly from
the disk.
PRINT# does not compress the data before writing it to disk.
It
writes a n ASCII-coded image of the data.
When you include the USING option, data is written to the disk
in the format you specify. See PRINT USING.
Examples
I f
A
=
1 2 3 . 4 5
PRINT#
l , A
writes this 9-byte character sequence to the file as:
h l 1 2 3 . 4 5 h l
c a r r i a g e r e t u r n
The punctuation in the PRINT list is very important. Unquoted
commas and semicolons have the same effect as they do in regu-
lar PRINT statements to the display. For example:
A
=
2 3 0 0
B
=
1 . 3 0 3
PRINT#
1 ,
A , B
writes the data on disk as:
hl 2 3 0 0
hlhlhlbhlbhlhlhlhl 1 . 3 0 3 M
c a r r i a g e r e t u r n
276

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents