Re: Newbie Question
- From: Howard Brazee <howard@xxxxxxxxxx>
- Date: Wed, 31 May 2006 10:20:39 -0600
On 31 May 2006 08:52:52 -0700, "theHip" <the_tragic_hip@xxxxxxxxx>
wrote:
I thought that that was what was stored there, but I couldn't make
sense of it. This routine is a check to make sure an account number is
valid. It goes through a whole bunch of multipys and divides and such,
and then the outcome of all this must match var2.
I've come across that kind of validation code. The last digit of the
account was created by a bank or somebody using the same calculation
and is used like a parity bit. If you don't get the same result, the
number is corrupt.
So don't try to make sense of it quite yet, just translate it. The
number doesn't have to be COMP though, all you're doing is arithmetic
and truncating until you get a digit to match with the digit they got.
Test it with supplied numbers and with hand-made corrupt numbers.
.
- References:
- Newbie Question
- From: the_tragic_hip
- Re: Newbie Question
- From: Howard Brazee
- Re: Newbie Question
- From: theHip
- Newbie Question
- Prev by Date: Re: Newbie Question
- Next by Date: Re: PIC P put to real use
- Previous by thread: Re: Newbie Question
- Next by thread: Re: Newbie Question
- Index(es):
Relevant Pages
|