LOTUSSCRIPT LANGUAGE


Print # statement
Example

Prints data to a sequential text file.

Syntax

Print #fileNumber , [ exprList ]

Elements

fileNumber


exprList
Usage

Use Print # only on files opened in Output or Append mode. Unlike the Write # statement, the Print # statement does not separate the printed data items with formatting characters such as commas and quotation marks.

Use the Spc and Tab functions to insert spaces and tabs between data items.

If you set a width for the file using the Width statement, then the following occurs:


Note Newline does not mean either chr(10) or chr(13) on all platforms. Newline is the character or sequence of characters that is used to mark the end of a line. This may be chr(10), or chr(13), but it may also be something else, because the actual value of newline depends on the platform.

The preceding statements about the effect of the Width statement apply for a width of 0, as well as any positive width.

The following table shows how the Print # statement handles data items specified in exprList.

Data itemPrint # statement behavior
variablePrints the value of the variable.
stringPrints the string.
date/time valuePrints the date as a string in the operating system Short Date and Time format. If either the date part or the time part is missing from the value, only the supplied part is printed.
Variant with the value EMPTYPrints nothing to the file for the data item.
Variant with the value NullPrints the string "NULL" to the file.
The following table shows the effect of semicolons and commas in the Print # statement.

Punctuation characterPrint statement behavior
Semicolon or space in exprListThe next data item is printed with no spaces between it and the previous data item.
Comma in exprListThe next data item is printed beginning at the next tab stop. (Tab stops are at every 14 characters.)

Example
See Also