TAB()

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

The TAB(n) function is used to format output to the mainwin and to the printer. It places the cursor or printer head at the column position indicated by (n).

Syntax

  1. tab(column number)

Hints

TAB(n) is similar to LOCATE n, y in the mainwin in that it positions the output at column n.
LOCATE, of course, also places the output at the specified row location.
If trying to format data in a columnar arrangement, use a fixed width font since the column widths are based on the character width of the font.
It does not allow to move cursor backwards(: if your cursor stays at 20 and you issue tab(15), it will stay at 20).
It does not work then trying to print to a file (does not compile).

Example

' The text is positioned at the column indicated by the tab argument.
    print
    print
    print "I agree to the proposed rules changes."
    print
    print tab(15); "________________________"
    print tab(21); "Signature"
    end

Useful Procedures

' Place a useful function or sub using this keyword here