[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CHECKSUM()
 Calculates the checksum for a character string (algorithm)
------------------------------------------------------------------------------
 Syntax

     CHECKSUM(<cString>) --> nCheckSum

 Argument

     <cString>  Designates the character string for which the checksum is
     computed.

 Returns

     The number returned is the checksum for the <cString>.

 Description

     CHECKSUM() calculates the checksum for a character string.  This
     checksum can determine if a character string has been changed, or
     transmitted or typed incorrectly.  CHECKSUM() is position dependent, so
     the likelihood of error recognition is greater than with ASCIISUM().

 Notes

     .  The return value is a 32-bit whole number.

     .  The checksum cannot be used for definitive coding of data
        because the calculated sum for two different character strings could
        be the same.  For example, the checksum for "PASTETEN" and "PERSONAL"
        are identical.

     .  If character strings have different lengths, the strings
        cannot have identical values.

 Examples

     .  In this example, ASCIISUM() would have returned identical
        results:

        ? CHECKSUM("abc")               // Result: 247334
        ? CHECKSUM("cba")               // Result: 246822

     .  Different character strings of identical length can produce
        identical results:

        ? CHECKSUM("PASTETEN")          // Result: 530020
        ? CHECKSUM("PERSONAL")          // Result: 530020

     .  A null string returns a result of 0:

        ? CHECKSUM("")                  // Result: 0


See Also: ASCIISUM()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson