[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.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
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
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.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
