25.140. PRINT [ # fn , ] print_list

[<<<] [>>>]

This command prints the elements of the print_list. The argument print_list is a comma separated list of expressions. The expressions are evaluated one after the other and are printed to the standard output or to the file.

The command prints the print_list to an opened file given by the file number fn. If fn (along with the # character) is not specified the command prints to the standard output. The file has to be opened to some "output" mode otherwise the command fails to print anything into the file. The command can also print into an opened socket (a file opened for mode socket). If the file is not opened then the expressions in the list print_list are not evaluated and the command actually does nothing. If the file is opened, but not for a kind of "output" mode then the expressions in the print_list are evaluated but the printing does not happen. Neither printing to a non-opened file number nor printing to a file opened for some read-only mode generates error.

If there is no print_list specified the command prints a new line. In other words if the keyword PRINT stands on the command with the optional # and the file number but without anything to print then the command will print a new line character.

Note that unlike other BASIC implementations the command PRINT does not accept print list formatters, like AT or semicolons and does not tabify the output. The arguments are printed to the file or to the standard output one after the other without any intrinsic space or tab added. Also the print statements does not print a new line at the end of the print list unless the new line character is explicitly defined or if there is no print list at all following the command.


[<<<] [>>>]