sandra_wallace
asked on
Calculate an ISBN checksum?
Hello Everyone,
I am trying to automate a few things here at the office for everyone. One of my projects is to create a simple program (very simple) that calculates the checksum or check digit of an ISBN number.
For example:
If you had an ISBN number of 157521030, the checksum would be 4. I've seen examples to verify the checksum, and I've seen the mathmatical equation, but I was wondering if anyone had a simple function or routine that does this? Perhaps a pointer to one that does?
Any help or guidance would be greatly appreciated.
Sincerely,
Sandra Wallace
sandra_wallace@yahoo.com
I am trying to automate a few things here at the office for everyone. One of my projects is to create a simple program (very simple) that calculates the checksum or check digit of an ISBN number.
For example:
If you had an ISBN number of 157521030, the checksum would be 4. I've seen examples to verify the checksum, and I've seen the mathmatical equation, but I was wondering if anyone had a simple function or routine that does this? Perhaps a pointer to one that does?
Any help or guidance would be greatly appreciated.
Sincerely,
Sandra Wallace
sandra_wallace@yahoo.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops, this line
result := chr(asc('0') + ModValue - 1)
should read
result := chr(ord('0') + ModValue - 1)
Cheers,
Raymond.
result := chr(asc('0') + ModValue - 1)
should read
result := chr(ord('0') + ModValue - 1)
Cheers,
Raymond.
ASKER