advr.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
  ◄Summary►  ◄Details►  ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
 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:
     • The argument column%
     • The current print position on the current output line when TAB is
       executed
     • The current output-line width
 
     The following table summarizes this relationship:
 
         If Current Position
         On Current Line Is...         Then TAB...
         ═══════════════════════════   ═════════════════════════════════════
         > column%                     Skips to column% on next output line
         column% < 1                   Moves print position to column 1
         column% > output-line width   Calculates print position equal to:
 
                                           column% MOD width
 
         Calculated position <         Jumps to next line at the calculated
         current print position        print position
         Calculated position >         Moves to calculated print position
         current print position        on the same line