CHECKSUM Function

── CHECKSUM ── ( ──<array row>── , ──<starting index>── , ─────────────►
►─<ending index>── ) ──────────────────────────────────────────────────┤

<starting index>

──<arithmetic expression>──────────────────────────────────────────────┤

<ending index>

──<arithmetic expression>──────────────────────────────────────────────┤

The CHECKSUM function returns, as a real value, a hash function of all bits in the words of the array row beginning with the word indexed by the <starting index> and up to, but not including, the word indexed by the <ending index>. Both the starting index and ending index are rounded to an integer value before they are used to index the array row. The value of this function can be used to verify the integrity of data being transferred or stored. The array row must be single-precision.

The CHECKSUM function can return the value of 0 or 1 as a valid result or as an error result. When the <starting index> is beyond the bounds of the array, the value returned is 1. When the <ending index> is beyond the lower bounds of the array or is more than one beyond the upper bounds of the array, the value returned is 1. If the span of the indexes is less than 2, then the result returned is 0.