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

Syntax:     ASCIISUM(<expC>)

Arguments:  <expC> is the string for which the sum of all ASCII codes is
            required to be calculated.

Returns:    A numeric value.
            The number corresponds to the sum of the ASCII codes for
            all characters of <expC>.

Usage:      This function can be used to form a simple check sum for
            strings.  It is, for example, used in remote data transmission
            to detect transmission errors.

Notes:      This checksum function does not consider the position of the
            character within the string, hence it will not be possible to
            determine a transposition of characters.  CHECKSUM() should
            be use in this case, as a more sophisticated method.

Library:    CT1.LIB


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

Examples:   * Transposed symbols give the same results under
            * all circumstances.
            ASCIISUM("abc")                     && Result: 294
            ASCIISUM("cba")                     && Result: 294

            * A null string  gives the result 0.
            ASCIISUM("")                        && Result: 0



See Also: CHECKSUM()

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