QBasic 1.1: WIDTH Statement
Explanation
WIDTH Statements
Assign an output-line width to a device (such as a printer) or file, or change the number of screen-display columns and rows.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
WIDTH [columns%] [,rows%] |
WIDTH {#filenumber% | device$}, columns% |
WIDTH LPRINT columns% |
Description / Parameter(s)
columns% |
The desired width in columns. Screen display width must be 40 or 80 columns. |
rows% |
The desired screen-display height in rows. The value can be 25, 30, 43, 50, or 60, depending on your display adapter and screen mode. |
#filenumber% |
The number of an open file or device. |
device$ |
The name of a device: SCRN:, COM1:, COM2:, LPT1:, LPT2:, LPT3: |
Example
OPEN "LPT1:" FOR OUTPUT AS #1
WIDTH #1, 132