[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
CppConstructor » MSDOS-Basics » CppVclPlaySound » WhatLinksHere » sourcecode » WINDOWS vs DOS » CppBitsetH » JavaPhone » BeginnersGuideToCurl » CppStaticCast » QbasicFAQ_PrintControlCodes
Displaying differences between revision 1 and the latest revision


[font=arial][size=2][b]What are Printer control Codes?[/b][/size][/font][br]

Back to QBasic FAQ Main Page

[[
Printer]] control codes, are used to pass information to control the [[printer]], and not actually print. An example of the simplest control code is CHR$(7), defined as BELL. (From when </b></font>printers<font color=green><b> actually had a bell and not a speaker.) Sending just the plain character 7 to the [[printer;]] will cause the [[printer]] will emit a beep.

Two more common codes are CHR$(12) and CHR$(13), these are Page Feed and Carriage Return. Sending just the [character]] 12 will eject a loaded page, where you can use 13 to index one line and return the print position to home.

REMEMBER to always use a semi-colon (;) after sending the control code, because by default, </b></font>QB<font color=green><b> will send a CHR$(13) after any LPRINT statement that does not have a semi-colon after it.



last edited (December 9, 2002) by KDivad Leahcim, Number of views: 3938, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Site Management by Lars Hagelin at Kontantkort.se.