Re: Newbie Question



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.
.



Relevant Pages

  • Re: LloydsTSB business account numbers
    ... have seven digit account numbers. ... is the cheque number, ... number is to add leading zeroes. ...
    (uk.finance)
  • Re: excel - numbers as text
    ... bug that limits it's precision to 15 significant digits. ... number looses its value in the 16th digit. ... an account number that is very significant. ... > you from formatting them as numbers, if that will speed up your work. ...
    (microsoft.public.excel.newusers)
  • Re: Data hiding in C++
    ... > the other digits and the total mod 11 equals the last digit. ... > digit string as a private data member. ... Therefore, given that this will be an account number class, it would ... > system and set a flag for that user one time during construction of the ...
    (alt.comp.lang.learn.c-cpp)
  • Re: LloydsTSB business account numbers
    ... have seven digit account numbers. ... zero, the next digit is 6 (it's a personal account though, not ... number is to add leading zeroes. ...
    (uk.finance)
  • Re: LloydsTSB business account numbers
    ... if anybody wants to pay me money they have to quote a leading "0"! ... account number to make a payment into it. ... digit account numbers, and these are not actually held as numbers ... that the software for these processing systems is still written ...
    (uk.finance)