CHARAND() Links corresponding ASCII codes of paired strings with an AND operation Syntax CHARAND(<cString1>,<cString2>) --> cString Arguments <cString1> [@] Designates the character string to which characters are added. <cString2> Designates the character string that contains the characters that are added to the characters in <cString1>. Returns The processed string is returned. Description CHARAND() can be used as a simple way to reset the high bit for all the characters in a string. The function joins (links bit by bit using an AND operation) each character in <cString1> with the corresponding character in <cString2>. Notes . When both character strings are the same length, then the first byte of <cString1> can be linked with the first byte of <cString2>, and the second byte of <cString1> can be linked with the second byte of <cString2>, and so on. If <cString2> is shorter than <cString1>, then as soon as the last byte of <cString2> is reached, the process continues and starts again with the first byte of <cString2>. However, if <cString1> is shorter than <cString2>, the process terminates with the end of <cString1>. . Implementing CSETREF() can suppress the return value for this function to save room in working memory. Example The second parameter is shorter than the first parameter in this example. As a result, the "1", the "a", and the first blank are joined with AND to the "1" in "123"; the "2", the "b", and the second blank are joined with AND to the "2" in "123"; and the "3", the "c", and the third blank are joined with AND to the "3" in "123": ? CHARAND("123abc ", "123") // "123!"# "
See Also: CHARXOR() CHAROR() CHARNOT() CSETREF() Introduction