Print (channel, output) PrintLine (channel, output)
The output argument settings are:
[{Spc(n) | Tab[(n)]}] [expression] [charpos]
Setting | Description |
---|---|
Spc(n) | Used to insert space characters in the output, where n is the number of space characters to insert. |
Tab(n) | Used to position the insertion point to an absolute column number, where n is the column number. Use Tab with no argument to position the insertion point at the beginning of the next print zone. |
expression | Numeric expressions or string expressions to print. |
charpos | Specifies the insertion point for the next character. Use a semicolon to position the insertion point immediately after the last character displayed. Use Tab(n) to position the insertion point to an absolute column number. Use Tab with no argument to position the insertion point at the beginning of the next print zone. If charpos is omitted, the next character is printed on the next line. |
Question: Are we keeping these settings?
Print will not include a linefeed at the end of a line; PrintLine, however, will.
Data written with Print # is usually read from a file with LineInput # or Input.
If you omit output for PrintLine, a blank line is printed to the file; for Print, nothing is output. Multiple expressions separated with a comma will be aligned on Tab boundries.
For Boolean data, either True
or False
is printed. The True and False keywords are not translated, regardless of the locale.
Date data is written to the file using the standard short date format recognized by your system. When either the date or the time component is missing or zero, only the part provided is written to the file.
Nothing is written to the file if output data is Empty. However, if outputlist data is dbNull, Null is written to the file.
For Error data, the output appears as Error errorcode
. The Error keyword is not translated regardless of the locale.
All data written to the file using Print # is internationally aware; that is, the data is properly formatted using the appropriate decimal separator. If the user wishes to output data for use by multiple locales, then Write # should be used.
Open Statement | Print Method | Spc Function | Tab Function | Write # Statement | Writing Data to Files