>How to calculate the LRC (Longitudinal Redundancy Check) in VFP 8.0?
For what I saw in Wikipedia
http://en.wikipedia.org/wiki/Longitudinal_redundancy_check I suppose it should be something like:
? CalcLRC([some string])
FUNCTION CalcLRC(lcStr)
LOCAL lnRetVal, lnFor
lnRetVal = 0
FOR lnFor = 1 TO LEN(lcStr)
lnRetVal = BITXOR(ASC(SUBSTR(lcStr, m.lnFor, 1)), lnRetVal)
NEXT
RETURN m.lnRetVal
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.