A keyword available in PRINT or INPUT.
There are two versions of TAB: TAB(X) and TAB(X,Y) and they are effectively two different keywords.
- TAB(X) is a printer orientated statement. The number of printable characters since the last new-line (COUNT) is compared with X. If X is equal or greater than COUNT, sufficient spaces to make them equal are printed. These spaces will overwrite any characters which may already be on the screen. If X is less than COUNT, a new-line will be printed first.
- TAB(X,Y) is a screen orientated statement. It will move the cursor on the screen to character cell X,Y (column X, row Y) if possible. No characters are overwritten and COUNT is not updated. Consequently, a TAB(X,Y) followed by a TAB(X) will give unpredictable (at first glance) results.
The leftmost column is column 0 and the top of the screen is row 0.
PRINT TAB(10);A$ PRINT TAB(X,Y);B$
Syntax
- PRINT TAB(<numeric>[,<numeric>])
- INPUT TAB(<numeric>[,<numeric>])