Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LRC - Longitudinal Redundancy Check?
Message
 
 
À
12/07/2002 16:30:23
Allen Hanna
H. A. Hanna Associates
Indianola, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00678269
Message ID:
00678301
Vues:
16
>Can anyone give me example code on doing LRC on a string?
>

IIRC, the LRC character is a result of XOR of each byte of the string.
lcStr = "LRC - Longitudinal Redundancy Check"
lnLRC = 0
FOR i=1 TO len(lcStr)
	lnLRC = BITXOR(lnLRC, ASC(SUBSTR(lcStr,i ,1) ))
ENDFOR

? lnLRC 
lcLRC = CHR(lnLRC)
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform