Microsoft KB Archive/20542

= Invoking Slashed Zeros in Character Mode, ImageWriter Printer =

Article ID: 20542

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 1.0
 * Microsoft QuickBASIC 1.0b
 * Microsoft QuickBASIC 1.0b
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Interpreter 1.0
 * Microsoft BASIC Interpreter 1.01 for Macintosh
 * Microsoft BASIC Interpreter 2.0
 * Microsoft BASIC Interpreter 2.1 for Macintosh
 * Microsoft BASIC Interpreter 3.0 for Macintosh

-



This article was previously published under Q20542



SUMMARY
This article applies to Microsoft QuickBASIC Versions 1.00, 1.00a, 1.00b, Microsoft BASIC Compiler Version 1.00, and Microsoft BASIC Interpreter Versions 1.00, 1.01, 2.00, 2.10, and 3.00 for the Apple Macintosh.

To invoke printing of slashed zeros on the Apple ImageWriter printer using control codes, refer to Page 42 of the ImageWriter printer manual. Although the manual gives the control codes for printing slashed zeros, it fails to mention that a space (" ") is also needed at a particular point, as follows: LPRINT CHR$(27);CHR$(68);" ";CHR$(1);CHR$(0);   ' Sets slashed zeros. X=5.003 : LPRINT "101010",X   ' Demonstrates slashing of zeros. LPRINT CHR$(27);CHR$(90);" ";CHR$(1);CHR$(0);   ' Sets non-slashed 0. LPRINT "101010",X   ' Demonstrates non-slashing of zeros.



MORE INFORMATION
ImageWriter control codes like this only have an effect in character-mode output. Character-mode printer output comes from one of the following:


 * 1) LPRINT
 * 2) PRINT#n to the device "LPT1:DIRECT" or the device "LPT1:BIN" that was OPENed as #n.

The undocumented device "LPT1:BIN" turns off conversion of horizontal tabs (CHR$(9)) to spaces, and is useful if you wish to actually output a CHR$(9). "LPT1:BIN" is not supported by the Microsoft BASIC Compiler Version 1.00 or the Microsoft BASIC Interpreter Version 2.00. "LPT1:BIN" is supported by the QuickBASIC Compiler Version 1.00 and all versions of the Microsoft BASIC Interpreter other than Version 2.00.

LPRINT, "LPT1:DIRECT", and "LPT1:BIN" are supported on directly connected printers only. They are not supported for Appletalk devices such as Appletalk ImageWriters and LaserWriters.

Additional query words: BasicCom MQuickB

Keywords: KB20542

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.