Article ID: 68446 - Last Review: November 21, 2006 - Revision: 1.3 WIDTH "CONS: " or "SCRN:" Uses Only 40 or 80 in Basic 7.00/7.10This article was previously published under Q68446 On This PageSYMPTOMS
In Basic PDS 7.00 and 7.10, the WIDTH for the screen device is
restricted to 40 or 80 characters across all the different WIDTH
syntaxes.
The WIDTH statement fails to set widths other than 40 or 80 for the "CONS:" device name in QuickBasic 4.50 (buglist4.50) and Basic PDS 7.00 and 7.10. The WIDTH statement also fails to set widths other than 40 or 80 for the "SCRN:" device name for Basic PDS 7.00 and 7.10, but succeeds in QuickBasic 4.50. (The problem occurs both in the environment and in a compiled .EXE program.) The documentation does not explicitly say what is expected for the WIDTH dev$,wid% syntax. STATUS
This may be a design restriction. Microsoft is researching this
problem and will post new information here in the Microsoft Knowledge Base
as it becomes available.
This information applies to QuickBasic version 4.50 and to Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS. MORE INFORMATION
Basic PDS 7.00 and 7.10 only lets you use WIDTH of 40 or 80 for the
WIDTH dev$,wid% syntax when dev$ is the screen device name "CONS:" or
"SCRN:". (This behavior actually matches the documented restriction
for the separate WIDTH wid%,height% syntax for screen output.)
The following code example demonstrates this behavior: Code ExampleThe following partial description of the WIDTH statement is taken from the QBX.EXE online help:
WIDTH {#filenumber% | device$}, width%
WIDTH {#filenumber% | device$}, width%
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 number associated with the
file in 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 with 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 file.
APPLIES TO
| Article Translations
|

Back to the top
