Tab: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''TAB(X)''' [[internal function]] returns the TAB character repeated X times
(For the GUI interface, see also [[Tabs]]).
 
TAB(<col>)
 
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====
====Comments and Examples====
Line 5: Line 9:
  00010 PRINT TAB(3)
  00010 PRINT TAB(3)


Line 10 prints the TAB character on the screen 3 times.
Line 10 positions the cursor on the screen at position 3.


====Related Functions====
====Related Functions====

Latest revision as of 03:16, 22 May 2014

(For the GUI interface, see also Tabs).

TAB(<col>)

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.