Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>chr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CHR()

Syntax:     CHR(<expN>)

Purpose:    To convert an ASCII code to a character.

Argument:   <expN> is the ASCII 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 ASCII code
            specified by <expN>.

Usage:      CHR() is very versatile and serves a number of common tasks
            which include:

            .  Send control codes to the printer.

            .  Ring the bell.

            .  Send graphic characters to the screen or printer.

            .  Stuff the keyboard buffer with key codes.

            Note that different commands treat characters in different
            ways.  For example, @...SAY CHR(7) displays a graphic
            character to the screen where ? CHR(7) sounds the bell.

            Note that CHR(0) 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.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   ? CHR(72)                        && Result: H
   ? CHR(61)                        && Result: =
   ? REPLICATE(CHR(61), 10)         && Result: ==========
   ? CHR(ASC("A") + 32)             && Result: a
   ? CHR(7)                         && Result: bell sounds
   *
   ? LEN(CHR(0))                    && Result: 1
   ? LEN("")                        && Result: 0


See Also: KEYBOARD ASC() INKEY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson