Skip to content

TAB

Syntax

TAB (I)

Description

Spaces to position I on the terminal. If the current print position is already beyond space I, TAB goes to that position on the next line. Space 1 is the leftmost position, and the rightmost position is the width minus one. I must be in the range 1 to 255. TAB may only be used in PRINT and LPRINT statements.

Example

10 PRINT "NAME" TAB(25) "AMOUNT": PRINT
20 READ A$, B$
30 PRINT A$ TAB(25) B$
40 DATA "G. T. JONES", "$25.00"

Output:

NAME                    AMOUNT

G. T. JONES             $25.00

See Also

  • SPC - Print spaces (similar function)
  • SPACE$ - Returns a string of spaces
  • PRINT - Print to console
  • LPRINT - Print to line printer
  • POS - Current cursor position
  • WIDTH - Set output line width
  • READ - Read data from DATA statements (used in example above)
  • DATA - Store data for READ statements (used in example above)