jvanegmond Posted March 18, 2010 Posted March 18, 2010 In Dutch banking there is a test called the elf proef to test whether or not any bank number is valid or not. The calculation algorithm is quite simple but I couldn't find any online checks at the time so wrote one of my own. Now I have found this tool where you can do it online: http://cgi.dit.nl/bank.cgi You can find more about the algorithm here: http://nl.wikipedia.org/wiki/Elfproef This is the script that checks a dutch bank account number and tells you whether it is valid or not: $bankNumber = InputBox("Elf proef", "Enter a dutch bank account number") if @error Then Exit $l = StringLen($bankNumber) if ($l <> 9 And $l <> 10) Then MsgBox(0, "Elf proef", "Every dutch bank account number has 9 or 10 digits. Your input is not valid because it has " & $l & " digits.") $split = StringSplit($bankNumber, "") $output = "Bank account number to be checked: " & $bankNumber & @CRLF $n = 1 $total = 0 For $i = $split[0] To 1 Step -1 $a = Number($split[$i]) * $n $output &= $split[$i] & " * " & $n & " = " & $a & @CRLF $n += 1 $total += $a Next $output &= "____________ +" & @CRLF $output &= " " & $total & @CRLF & @CRLF $div = $total / 11 $output &= $total & " / 11 = " & $div & @CRLF $round = Round($div) == $div If $round Then $output &= "This is a valid bank account number" & @CRLF Else $output &= "This is NOT a valid bank account number" & @CRLF EndIf MsgBox(0, "Elf proef", $output) github.com/jvanegmond
AlmarM Posted March 18, 2010 Posted March 18, 2010 (edited) [dutch] Kun je dit niet ook doen met een Persoonsnummer op je ID of paspoort? [/dutch] Edited March 18, 2010 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
jvanegmond Posted March 18, 2010 Author Posted March 18, 2010 [dutch] Kun je dit niet ook doen met een Persoonsnummer op je ID of paspoort? [/dutch] Klopt! Dat staat ook beschreven op de Wiki: http://nl.wikipedia.org/wiki/Elfproef Het kan met acceptgiro's (daar kennen ze andere gewichten toe ipv 987654321) en met het nieuwe burgerservicenummer. github.com/jvanegmond
AlmarM Posted March 18, 2010 Posted March 18, 2010 burgerservicenummer.Dat woord zocht ik! Ik dacht dit gehad te hebben tijdens het Wiskunde Examen 2009. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now