Tab function (LotusScript® Language)

Moves the print position to a specified character position within a line, when called from within a Print or Print # statement.

Syntax

Tab ( column )

Elements

column

Any integer expression between 1 and 32000, inclusive, specifying a character position in the printed output. If column is less than 1, the Tab position defaults to 1 (the leftmost print position).

Usage

If you haven't specified a width for the file, Tab checks column against the current print position, and acts as follows:

  • If you've already printed past the position specified by column, Tab prints a newline character, and then prints the next character in the column position on the next line.
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.
  • If column is at the current position, or after the current position, Tab prints enough spaces to move to the position specified by column and prints the next character in the column position on the current line.

If you print to a file whose width was set with the Width # statement, Tab interacts with that width as described in the following table.

Column

Tab moves to:

> width

column Mod width

< 1

column 1

< current print position

(column - current position) on the next line

> current print position

(column - current position) on the same line

Example