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>charrelrep()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CHARRELREP()

Syntax:     CHARRELREP(<expC1>,<expC2>,<expC3>,[@]<expC4>,<expC5>)

Arguments:  <expC1> denotes the character to search for in <expC2>.
            <expC2> is the string to search for character <expC1>.
            <expC3> denotes the character to search for in <expC4>.
            <expC4> is the string to search for character <expC3>.
            <expC5> is a character to replace the existing character in
            the established position of <expC4>.

Returns:    A character string.
            The modified <expC4> string.

Usage:      At the positions were both the <expC1> character in
            <expC2>, and the <expC3> character in <expC4>
            correspond, the character in the <expC4> string is replaced
            by <expC5>.  This can be used, for example, to simplify
            processing variables containing screens.  It is possible to
            Replace position 34 for the combination "|", if the variable
            Fig1 in position 34 contains the "_" character and Fig2
            contains the character "+" in the same position.

Notes:      Basically the function operates like CHARRELA(), except the
            positions which correspond are determined, and the character
            in <expC4> is replaced by <expC5>.  The number of search
            processes will in each case determine the length of
            <expC4>.

Library:    CT1.LIB


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

Examples:   * Determine all positions where both "b" is
            * present in the first string and "1" in a second
            * string.  The character in this position
            * should then be replaced by the argument
            * <expC4>.

            var = CHARRELREP("b","b b b b","1";
                "bbb11111","x")

            ? var                       && "bbb1x1x1"



See Also: CHARRELA()

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