The CHECKSUM function returns a simple numeric checksum of a character string.
Command Syntax
CHECKSUM(expression)
Syntax Elements
The expression may evaluate to any result but will usually be a string. The function then scans every character in the string and returns a numeric addition of the characters within the string.
Notes
The function calculates the checksum by summing the product of the ASCII value of each character and its position within the string.
Example
INPUT DataBlock,128:
IF CHECKSUM(DataBlock) = ExpectedChk THEN
CRT AckChar:
END
ELSE
......
0 comments:
Post a Comment