If PRINT Fails on Non-Standard System, PRINT#n to "CONS: " (40632)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
This article was previously published under Q40632 SUMMARY
The PRINT and WRITE statements write directly to video memory; they do
not write to the screen through function calls to MS-DOS or the ROM
BIOS. This information applies to Microsoft QuickBasic Versions 4.00,
4.00b, and 4.50, Microsoft Basic Compiler Versions 6.00 and 6.00b for
MS-DOS and MS OS/2, and Microsoft Basic PDS Version 7.00 for MS-DOS
and MS OS/2.
By circumventing MS-DOS and the ROM BIOS, the PRINT and WRITE
statements may not work correctly with certain non-standard or
unsupported operating-system configurations (such as PC-MOS,
Multi-DOS, or multitasking packages added to MS-DOS).
To be more compatible with non-standard systems, you can send output
to a logical device name that routes the characters through an
MS-DOS character device driver.
For example, output through the "CONS:" (CONSole) or "CON" device name
forces all output through the MS-DOS console device driver. The MS-DOS
console device driver makes ROM BIOS calls to perform the output.
You can OPEN "CONS:" FOR OUTPUT AS #n and send output with the PRINT#n
or WRITE#n statement.
Similarly, if you have trouble printing with LPRINT to a network
printer, OPEN "LPT1:" FOR OUTPUT AS #n and send output with the
PRINT#n or WRITE#n statement.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB40632 |
---|
|