PRINT
PRINT { [expr] [,] [;] }
PRINT #
PRINT # expr { [expr] [,] [;] }
Send the values following the Print statement to the output. Values seperated by semicolons {;} have no spaces between them, while values seperated by commas {,} have a single space placed between them:
PRINT "Hello, world!"
PRINT "a = "; a
The linefeed is automatically placed after the last item, unless it is followed by a semicolon:
' this generates a linefeed
PRINT "Hello, world!"
' this does not
PRINT "Hello, world";
Output can be directed to a file by using the Print # form of the command:
' open a file for output
OPEN "output.txt" FOR OUTPUT AS #1
' print some text
PRINT #1, "This is written to the file"
PRINT #1, "And so is this"
' close the file
CLOSE #1