bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WIDTH Statements Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Assigns an output-line width to a device (such as a printer), or changes the
number of text columns and lines displayed on the screen.
WIDTH {#filenumber% | device$}, width%
WIDTH LPRINT width%
WIDTH {screenwidth% | ,screenheight% | screenwidth%, screenheight}
■ The WIDTH #filenumber%, width% form:
- Sets the line width of an output device already opened as a file
(for example, LPT1: or CONS:).
- The argument filenumber% is the file number associated with the
device through the OPEN statement.
- The "#" character in front of filenumber% is not optional.
- The width assignment takes place immediately.
■ The WIDTH device$, width% form:
- Sets to width% the line width of device$ (a device filename).
The device should be a string expression (for example, "LPT1:").
- The width assignment is deferred until the next OPEN statement
affecting the device.
- The assignment does not affect output for an already open device.
■ The WIDTH LPRINT width% form:
- Sets the line width of the line printer for use by subsequent
LPRINT statements.
- Equivalent to the statement form: WIDTH "LPT1:", width
■ The WIDTH {screenwidth% | ,screenheight% | screenwidth%, screenheight}
form:
- Sets the number of text character columns and lines to display
on the screen.
- The value of screenwidth% must be either 40 or 80; default
is 80.
- The value of screenheight% may be 25, 30, 43, 50, or 60,
depending on the display adapter used and the screen mode.
- The number of lines that can be displayed when the program
is started are listed below:
Screen Screenwidth x Color
Adapter(1) mode(2) screenheight display
═══════════ ═══════ ══════════════════════════ ═══════════════════════
MDPA 0 80x25 Monochrome
Hercules 0 80x25 Monochrome
3 80x25 Monochrome
CGA 0 40x25, 80x25 Color
1 40x25 Color
2 80x25 Color
EGA 0 40x25, 40x43, 80x25, 80x43 Color
0 40x25, 40x43, 80x25, 80x43 Enhanced color
0 40x25, 40x43, 80x25, 80x43 Monochrome
1 40x25 Color or Enhanced color
2 80x25 Color or Enhanced color
7 40x25 Color or Enhanced color
8 80x25 Color or Enhanced color
EGA 9 80x25, 80x43 Enhanced color
EGA or VGA 10 80x25, 80x43 Monochrome
VGA 0 40x25, 40x43, 40x50 Analog
0 80x25, 80x43, 80x50 Analog
1 40x25 Analog
2 80x25 Analog
7 40x25 Analog
8 80x25 Analog
9 80x25, 80x43 Analog
10 80x25, 80x43 Analog
11 80x30, 80x60 Analog
12 80x30, 80x60 Analog
13 40x25 Analog
MCGA 0 40x25, 80x25 Color or Analog
1 40x25 Color or Analog
2 80x25 Color or Analog
11 80x30, 80x60 Analog
13 40x25 Analog
─────────────────────────────────────────────────────────────────────────
(1) See ◄SCREEN Statement► for a description of the different adapters.
(2) Screen mode 4 has a screen width and screen height of 80x25
in text format. For a list of the computers supported by
BASIC screen mode 4, see the ◄SCREEN Statement►.