GW-BASIC User's Guide
WIDTH Statement
Purpose:
To set the printed line width in number of characters for the screen and line printer.
Syntax:
WIDTH size
WIDTH file number, size
WIDTH "dev", size
Comments:
size, an integer within the range of 0 to 255, is the new width.
file number is the number of the file that is open.
dev is a valid string expression identifying the device. Valid devices are SCRN:, LPT1:, LPT2:,
LPT3:, COM1:, and COM2:.
Changing Screen Width
The following statements are used to set the screen width. Only a 40- or 80-column width is
allowed.
WIDTH size
WIDTH "SCRN:", size
See the SCREEN statement for more information.
Changing SCREEN mode affects screen width only when moving between SCREEN 2 and
SCREEN 1 or SCREEN 0.
Note
Changing the screen width clears the screen and sets the border screen color to black.
Changing Line printer Width
The following WIDTH statement is used as a deferred width assignment for the line printer. This
statement stores the new width value without actually changing the current width setting:
WIDTH "LPT1:", size
file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/WIDTH.html (1 of 2)28/03/2004 21.29.32