Convert an ASCII code to a character value

     CHR(<nCode>) --> cChar


     <nCode> is an ASCII code in the range of zero to 255.


     CHR() returns a single character value whose ASCII code is specified by


     CHR() is a numeric conversion function that converts an ASCII code to a
     character.  It is the inverse of ASC().  CHR() serves a number of common
     tasks including:

     .  Sending control codes and graphics characters to the screen or

     .  Ringing the bell

     .  Converting INKEY() return values to characters

     .  Stuffing the keyboard buffer


     .  The null character: CHR(0) has a length of one (1) and is
        treated like any other character.  This lets you send it to any
        device or file, including a database file.


     .  These examples illustrate CHR() with various arguments:

        ? CHR(72)                    // Result: H
        ? CHR(ASC("A") + 32)         // Result: a
        ? CHR(7)                     // Result: bell sounds

     .  These lines of code show the difference between a null string
        and the null character:

        ? LEN("")                   // Result: 0
        ? LEN(CHR(0))               // Result: 1

 Files   Library is CLIPPER.LIB.

See Also: ASC() INKEY()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.