bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
TAB Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
TAB moves the text cursor to a specified print position when used in the
PRINT, PRINT USING, LPRINT, LPRINT USING, and PRINT # statements.
 
TAB(column%)
 
Usage Notes
    ■ The leftmost print position is always 1. The rightmost position
      is the current line width of the output device (which can be set
      with the WIDTH statement).
    ■ Here is an example of using TAB in the PRINT function:
          PRINT  TAB(10); City$; TAB(40); State$; TAB(45); Zip$
    ■ The behavior of a TAB function depends on the relationship between
      three values: column%, the current print position on the current
      output line when the TAB function is executed, and the current
      output-line width:
        - If the current print position on the current line is greater
          than column%, TAB skips to column% on the next output
          line.
        - If column% is less than 1, TAB moves the print position to
          column 1.
        - If column% is greater than the output-line width, then TAB
          calculates
              print position = (column% MOD width).
          If the calculated print position is less than the current print
          position, the cursor jumps to the next line at the calculated
          print position. If the calculated print position is greater
          than the current print position, the cursor moves to the
          calculated print position on the same line.