From Br Wiki
Jump to: navigation, search

(For the GUI interface, see also Tabs).


The TAB(x) internal function positions the cursor at column x (similar to POS in a FORM statement), where x is any numeric expression. If the current position of the line is greater than column x, the cursor is positioned at column x in the next line. If x is negative, TAB(1) is assumed. If x is not an integer, it is rounded. If x is greater than the record length, the cursor is positioned at column 1 in the next line.

Comments and Examples

00010 PRINT TAB(3)

Line 10 positions the cursor on the screen at position 3.

Related Functions

Other special functions used mainly in PRINT are BELL and NEWPAGE.

Technical Considerations

  1. In an unformatted PRINT statement, when NEWPAGE precedes the TAB(X) function, the TAB function will appear to be off by one column because the character for NEWPAGE appears in the output buffer, but not on the screen or printer. Avoid using NEWPAGE (or BELL) before TAB in an unformatted PRINT statement. One remedy is to use one PRINT statement for NEWPAGE (and BELL) and another for the TAB function and other output.