**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
**To download this example - **click here.

**See Also:**
ASCIISUM()