TAB(
From C64-Wiki
| BASIC keyword | |
| Keyword: | TAB( |
| Abbreviation: | T, Shift+A |
| Type: | Miscellaneous |
| Token code: | 163/$A3 |
| List of all BASIC keywords | |
Remark: This article describes the BASIC-Command TAB( in BASIC V2 at the Commodore 64.
Type: Function General Programming-Syntax: TAB(<Numeric>)
With TAB the cursor can be set in the logical screen-column with the BASIC-command PRINT. By using more spaces as onetime, it is better to use the BASIC function SPC when the PRINT-text is outputted to a printer or written into a file or when the BASIC-command PRINT# is used.
Valid numbers are from 0 to 255 otherwise the BASIC-error ?ILLEGAL QUANTITY ERROR IN line occur. By using a non-numerical argument the BASIC-error ?TYPE MISMATCH ERROR IN line appear. If the numerical argument is missing, the BASIC-error ?SYNTAX ERROR IN line is shown.
When the last char in the actual print-line is reached, the printer automatically makes a carriage return and a linefeed.
[edit] Examples
PRINT TAB(10) "10 spaces before this" TAB(44) "...and 44 more spaces..."
ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC( | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB( | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT