Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>wordtochar()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WORDTOCHAR()
 Exchanges double characters for individual ones
------------------------------------------------------------------------------
 Syntax

     WORDTOCHAR(<cDoubleCharacterList>,<cString>,
        <cCharacterlist>) --> cString

 Arguments

     <cDoubleCharacterList>  Designates multiple 2-byte sequences which
     are exchanged for corresponding individual characters from the
     <cCharacterlist>.

     <cString>  Designates the character string within which 2-byte
     sequences are exchanged for individual characters.

     <cCharacterlist>  Designates a sequence of individual characters
     which correspond to 2-byte sequences in <cDoubleCharacterList> for
     replacement within <cString>.

 Returns

     WORDTOCHAR() returns the modified character string.

 Description

     When you use SOUNDEX algorithms, sequences of two characters must often
     be exchanged for a single other character.  WORDTOCHAR() makes this
     process extremely simple and quick.

     The function processes the <cString> in 1-byte steps.  The behavior
     after exchanging a sequence for a character is determined by
     CSETATMUPA().  If CSETATMUPA is .F., the search for more sequences
     continues after the exchanged characters.  If CSETATMUPA is .T., the
     search for more sequences continues and includes the exchanged
     characters.

 Notes

     .  The term "word" is not used here in the textual sense, but
        rather as it is used in assembler programming.  A "word" consists of
        units of 16 bits, or more precisely, 2 bytes.

     .  <cCharacterlist> can be shorter than <cDoubleCharacterList>.
        When this occurs, the function exchanges the sequences in
        <cDoubleCharacterList> that do not have corresponding sequences in
        <cCharacterlist> for the last sequence in <cDoubleCharacterList>.

 Examples

     .  This example shows a simple replacement:

        ? WORDTOCHAR("aa", "Xaaaa", "a")      // "Xaa"

     .  This example shows WORDTOCHAR() in conjunction with
        CSETATMUPA():

        CSETATMUPA(.F.)                       // Multi pass off
        ? WORDTOCHAR("aa", "Xaaaa", "a")      // "Xaa"
        CSETATMUPA(.T.)                       // Multi pass on
        ? WORDTOCHAR("aa", "Xaaaa", "a")      // "Xa"


See Also: CSETATMUPA() WORDREPL() CHARREPL()

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