[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
QbasicFAQ_PrintControlCodes
What are Printer control Codes?
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 printers 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, QB 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]
QbasicFAQ_PrintControlCodes
What are Printer control Codes?
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 printers 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, QB 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]
