ASCIISum()
Calculate the sum of the ASCII values of the characters in a string
Syntax
ASCIISum( <cString> ) --> nASCIISum
Arguments
<cString> the string to be processed
Returns
<nASCIISum> sum of the ASCII values in <cString>
Description
The ASCIISum() function sums up the ASCII values of the characters in <cString>. Be aware that the function is not position sensitive, i.e. a change of position of a certain character in the string does not change the ascii sum.
Examples
? ASCIISum( "ABC" ) // --> 197 ? ASCIISum( "ACB" ) // --> 197
Tests
ASCIISum( Replicate( "A", 10000 ) ) == 650000 ASCIISum( "0123456789" ) == 525 ASCIISum( NIL ) == 0
Compliance
ASCIISum() is compatible with CT3’s ASCIISum().
Platforms
All
Files
Source is ASCIISum.c, library is ct3.
Seealso
CHECKSUM()