IB Statements/chksum

From CometWiki

< IB Statements
Revision as of 10:47, 22 May 2009 by Badge (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CHKSUM function

Syntax: CHKSUM(string-argument)

Discussion: The CHKSUM function returns the block check character (BCC) for the specified string-argument. The string-argument may be a string constant, a single-element string variable, a string array element, a string expression, or a string function. It may be from 1 to 254 characters long.

Note: The CHKSUM function uses the same check sum algorithm that is used by Comet's terminal protocol.

Example:

 LENGTH 1 & LOCAL VALUE$
 .
 VALUE$ = CHKSUM(DATA$)

In the above example, the CHKSUM function will return the block check character for the data value stored in the string variable DATA$. This block check character will be stored in the string variable VALUE$.

Personal tools