checkdigit calculation for HP-17b
|
07-26-2015, 11:03 PM
(This post was last modified: 07-28-2015 02:32 AM by Gerson W. Barbosa.)
Post: #10
|
|||
|
|||
RE: checkdigit calculation for HP-17b
Don, here is a Free Pascal version:
Code:
Run: 999999999 99 Type EXIT to return... Again, no attempt has been made to optimize the program, but it's interesting to compare the number of characters in both the Pascal and 17Bii codes. Notice the algorithm I've used is somewhat different (and easier to implement on the 17Bii) than the one in the Wikipedia article. Nonetheless, I get exactly the same results. Gerson. Edited to fix program line #17 Edited again to fix algorithm (inclusion of an IF-clause) Code:
As I said, this algorithm is more simple than the official one [ function TestaCPF(strCPF) ]. I have yet to discover why this works. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)