System Functions

LRC( )

Longitudinal-Redundancy Check

Format

LRC(string$[,ERR=stmtref])
 
Where:

string$

Character string whose longitudinal redundancy checksum is to be calculated.

stmtref

Program line number or statement label to which to transfer control.

Returns

One-byte string, longitudinal checksum.

Note:
The LRC( ) function is used primarily in conjunction with synchronous communications.

Description

The LRC( ) function returns the longitudinal redundancy checksum of a character string. The longitudinal redundancy check of a character string is a one-byte string resulting from a logical XOR( ) comparison of all the characters in the string.

Example

A$=hta(lrc($0102$)) ! yields Hex 03
A$=hta(lrc($0305$)) ! yields Hex 06