Invoking Slashed Zeros in Character Mode, ImageWriter Printer (20542)



The information in this article applies to:

  • Microsoft QuickBASIC 1.0
  • Microsoft QuickBASIC 1.0a
  • Microsoft QuickBASIC 1.0b
  • Microsoft BASIC Compiler
  • Microsoft BASIC Interpreter for Apple Macintosh 1.0
  • Microsoft BASIC Interpreter for Apple Macintosh 1.01
  • Microsoft BASIC Interpreter for Apple Macintosh 2.0
  • Microsoft BASIC Interpreter for Apple Macintosh 2.1
  • Microsoft BASIC Interpreter for Apple Macintosh 3.0

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.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB20542