Toshiba KB-80 Computer Keyboard User Manual


 
- 57 -
PRINT#
Function Outputs data (numeric value or character string) to the sequential file.
Format PRINT# <file number>, [USING <format control character string> ; ],
<expression list>
Term <file number>: The number assigned to the file by the OPEN statement.
<expression list>: Numeric expressions and characters are delimited by a comma
(,) or semicolon (;), and listed.
<format control character string>: A character string formatted for outputting data to
the file is specified in detail
Explanation The PRINT# statement is similar to the PRINT statement, however, the data is not
displayed on the screen, and the character string is output to a file. The format
designation by the USING statement is also similar. For details, refer to the PRINT
USING statement.
The PRINT# statement does not compress data in the file. The data is written to the
file with the same format as displayed on the screen by the PRINT statement.
When <expression> is a numeric value, is should be delimited by a semicolon (;). If
a comma (,) is used, every 14-byte data is output like the PRINT statement, resulting
in more file areas being unnecessarily used.
PRINT #1, 12;-34.5;”ABC”;”DEFG”
In the above case, the data written to the file is shown below.
12 -34.5 ABCDEFG CR LF ( : space)
When <expression> is the character string, it should be delimited by a comma (,). If
a semicolon (;) is used, character strings are connected to each other, and they are
output as one character string to the file.
Ex.) A$=”CAMERA”, B$=”93604-1”
PRINT #1,A$;B$
If the statement is described as above, A$ is connected to B$, and “CAMERA93604-
1” is output as one string to the files.
To prevent the above, a comma (,) should be inserted as a delimiter between
character strings as below.
PRINT #1,A$;”,”;B$
If the statement is described as above, data can be read properly by the INPUT#
statement, and the data is written to the file properly as below.
CAMERA, 93604-1