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

Syntax:     CHAROR([@]<expC1>,<expC2>)

Arguments:  <expC1> is the string to be OR'd.
            <expC2> contains the character to be used when OR'ing
            <expC1>.

Returns:    A character string.
            The processed <expC2> string.

Usage:      The function will OR each byte in <expC1> with the
            corresponding character in the <expC1> string.  CHAROR()
            can therefore be used to place specific bits within the
            characters.

Notes:      If two strings are the same length, then the first byte of
            <expC1> will be joined to the first byte of the <expC2>, the
            second byte of the <expC1> with the  second byte of
            <expC2>, etc.  If <expC2> is shorter than the <expC1>, then
            when the last byte of <expC2> is reached the continuation
            will start with the first byte of <expC2> again.  However, the
            process will stop at the end of <expC1> if <expC1> is
            shorter than <expC2>.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * Both bytes of the first argument will be
            * linked by an or with the character "0",
            * so CHR(1) will be converted into the
            * ASCII character "1", CHR(2) into the ASCII
            * character "2".
            ? CHAROR(CHR(1)+CHR(2),"0")         && "12"

            * All bytes of the first arguments will be
            * linked to CHR(32) by an OR (only bit 5
            * will be set with 32).
            ? CHAROR("123ABC[\]abc"CHR(32))     && "123abc{|}abc"



See Also: CHARAND() CHARNOT() CHARXOR()

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