Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programming archeology
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00204262
Message ID:
00204560
Views:
15
Thanks Marc,

I found some interesting answers from a quick search on the web:

from http://www.mcis.duke.edu/standards/HL7/pubs/version2.3/html/ch200025.htm I quote what follows (it can be done with only additions and substractions):

The algorithm for calculating a Mod10 check digit is as follows: Assume you have an identifier = 12345. Take the odd digit positions, counting from the right, i.e., 531, multiply this number by 2 to get 1062. Take the even digit positions, starting from the right (i.e., 42), prepend these to the 1062 to get 421062. Add all of these six digits together to get 15. Subtract this number from the next highest multiple of 10, i.e., 20 - 15 to get 5. The Mod10 check digit is 5. The Mod10 check digit for 401 is 0; for 9999, it's 4; for 99999999, it's 8.

At http://www.cedex.com/csi/news/checkdgt.htm there is an algorithm to calculate a Mod11 check digit that can be used also with alphanumeric data and can be done just using shifts.

I go on leave now.

Silvio.
Previous
Reply
Map
View

Click here to load this message in the networking platform