back to Command Reference
[All Models]
Outputs data to a sequential file.
PRINT# file number [, output data [ { , | ; } [ output data ] ]* ]
└────┬────┘
Numeric expression
Output data: TAB
String expression
Numeric expression
PRINT #1, A$
file number: Numeric expression truncated to an integer in the range of 1 ≦ file number ≦ 2
CR-LF (0Dh, 0Ah) is output following the last output data when a semicolon and comma are not included.FOR OUTPUT), and for communication circuit (COM0:) input/output files.10 OPEN "CAS0:TEST" FOR OUTPUT AS #1
20 INPUT "DATA=", A$
30 IF A$="" THEN 60
40 PRINT #1, A$
50 GOTO 20
60 CLOSE: END
Creates sequential file on cassette tape for input of characters from keyboard.
10 OPEN "CAS0:TEST" FOR INPUT AS #1
20 INPUT #1, A$
30 CLOSE
Reads sequential file on cassette tape created in Sample Program 1.