[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
CHR()
CHR() returns a character from the IBM Extended Character Set.
Syntax
CHR(<exp N>)
Argument
<expN> is the IBM Extended Character Set code of the character to
return and can be in the range of zero to 255.
Returns
A character value.
CHR() returns the character corresponding to the IBM Extended Character
Set code. Note that different commands treat characters in different
ways. For example, @...SAY CHR(7) displays a graphic character to the
screen whereas ? CHR(7) sounds the bell.
Usage
CHR() enables you to send control codes to the printer. Another
typical application is to produce special effects on a printer and/or
monitor by sending a value in the IBM Extended Character Set for any
keyboard character or graphics character. Another typical application
is to use CHR() to ring the bell alerting the user of an error.
A more sophisticated application is to control the keyboard.
Typically, you use CHR() in combination with KEYBOARD to stuff the
keyboard with key codes. In some instances, you might find it useful
to create key names by assigning the CHR() of the key code to a memory
variable. Later, you can compare the result of a CHR(INKEY()) to the
key name variable.
BNote: CHR(0) now has a length of one and is treated the same as any
other character. This allows you to send it to any device or file,
including a database file.
See Also:
KEYBOARD
ASC
INKEY()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson