Joséééééééééééééé,
I never had to validate bank accounts, just had to generate new check digti number (airway bills) and they do use a check digit mod 7. For 2 digits, you're right the check digit is 97, I quoted from memory, and l'âge aidant, I should not.
I'm glad to hear about your friend. But it is scary no? Last week my boss asked me to find the telephone number of somebody in New York, I said, you're crazy, cannot be done. He said "Try". So I tried, after 30 secs I was back with the number, a map of where his block is situated and a list of his neighbours.
Then I thought, Jesus, that is scary! But then, it _is_ the US, they're all crazy out there, it'll a take a few years before they'll find me. ...
Then I tried "Grajower", found my address my telephone number and a map .... and the site that delivers these miracles is our good old InfoBel. :)
L'avenir ne manque pas de futur.
Marc
>>>Many years ago, more than I care to remember, I used to program accounting machines. One thing all our "programs" had was a check digit appended at the end of numeric codes so that it was easy to detect misstypings. I cannot remember how those check digits were calculated but it had to be very simple: only the most expensive machines could multiply or divide. Anybody knows how the check digit was calculated?
>>
>>> I am taking a few days off, the first in several months, and I know that not having the answer risks spoiling the fun.
>>
>>That we dooooo not want.
>>
>>for 1 digit they take mod(x,7) where x is the number without check digit. For a 2 digit check they would take mod(x,93).
>>
>>They may not have been able to multiply or devide, but they could 'shift' 'push' and 'pop' like nobody can today if my memory is correct :)
>>
>>Marc
>
>Hi Marc,
>
>Belgian bank accounts have the following format, (as you may know...) 340-0551143-27 (the next one would be 340-0551144-28)
>
>Here is the valid from my cBankTextBox.
>
>
>*---------------------- Location Section ----------------------
>* Library...........: common30\ccustctl.vcx
>* Class.............: Cbanquetextbox
>* Method............: Valid()
>*-------------------------- Copyright -------------------------
>* Author............: José Constant
>* Project...........: Prosal
>* Created...........: 11/07/96 15:01:56
>* Copyright.........: (c) Terre-Engineering S.A. , 1996
>*----------------------- Usage Section ------------------------
>
>LOCAL lAg, ;
> lCp, ;
> lMod, ;
> lAgcp
>
>lAg = SUBSTR(this.value,1,3)
>lCp = SUBSTR(this.value,4,7)
>lMod = SUBSTR(this.value,11,2)
>lAgCp = lAg + lCp
>
>IF this.Value = "000000000000";
> .OR. this.Value = "903000900379";
> .OR. lCp = "0000000"
> this.value = ""
> this.Refresh()
>ELSE
> IF VAL(lAgcp) = 0 .AND. VAL(lMod) =97
> RETURN .T.
> ELSE
> IF MOD(VAL(lAgcp),97)=0 .AND. VAL(lMod) = 97
> RETURN .T.
> ELSE
> IF MOD(VAL(lAgcp),97) <> VAL(lMOD)
> =ErrorMsg(ILLEGALVALUE_LOC)
> RETURN .F.
> ELSE
> RETURN .T.
> ENDIF
> ENDIF
> ENDIF
>ENDIF
>
>RETURN
>
>
>
>
>By the way, Marc, I found back the guy I was researching by checking the phone guides on the Web. He was second on the list I tried!
>
>José
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.