Jump to content

checking if a number is an integer


This topic is 6566 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

hi all,

I'm working on a system in which the bankaccountnumbers of customers are entered. To check if the number is correct (actually, if the number is possible, it won't check name with number), I need to make the following calculation (I live in the Netherlands, I'm guessing it only works for our accountnumbers so you might have seen different calculations);)

the number is 9 digits.

first digit * 9

second digit * 8

third digit * 7

etc.

The sum of the results needs to be divided by 11. If that number is an integer (a number without a comma) the accountnumber is correct. I've made my calculation in the following way, but I don't know how to check on the integer.

Note: bankrekeningnummer = bankaccountnumber

If ((Middle( bankrekeningnummer ; 1 ; 1) * 9 + Middle( bankrekeningnummer ; 2 ; 1) * 8 + Middle( bankrekeningnummer ; 3 ; 1) * 7 + Middle( bankrekeningnummer ; 4 ; 1) * 6 + Middle( bankrekeningnummer ; 5 ; 1) * 5 + Middle( bankrekeningnummer ; 6 ; 1) * 4 + Middle( bankrekeningnummer ; 7 ; 1) * 3 + Middle( bankrekeningnummer ; 8 ; 1) * 2 + Middle( bankrekeningnummer ; 9 ; 1))/11= **integer** ;"correct";"incorrect")

Does anyone know what to fill in at **integer**? thanks in advance.

Link to comment
Share on other sites

Hi Florens,

I'm attaching the file Zipped for you.

There is a Free Unstuffit file for Windows that you can download that will handle either Zip or Sit files.

I didn't check this particular file, but it looks like it will do it for you. You might also want to look at this other thread Click Here which had a couple of attachments also.

HTH

Lee

CheckDigitMonkey.zip

Link to comment
Share on other sites

In my very humble opinion, Stuffit for Windows is a big piece of poo-poo.

Downloading from the website is slow. The standard trial version makes you wait before you can uncompress. When I first installed it, the installer gave me some stupid error about certain files being locked, and if I tried to open Stuffit expander, it gave me some gibberish error message. I have since corrected this problem, but still. The free version does not compress, it just expands (hence the name expander). So perhaps it's just because my first experience with it was bad, but I would not suggest this program.

But if you're a Mac user, Stuffit seems to be the only option. So they like to tell windows users to go and download it because we all just need another compression program (thanks, winzip and winrar and winace weren't enough).

Since Stuffit can compress in zip format, perhaps we can all just make a conscious effort to make our attachments zip files. That would be very nice to those without stuffit. grin.gif

Ok, i'm done whining and complaining. Sorry

Link to comment
Share on other sites

Hi Kenneth,

Yes, I do think you are whinning about nothing. The Expender is FREE, do you not expect that it would be for just expanding stuffit files?? That was the point. If you can't open a Stuffit file, it gives you a way to do so. I also feel that if it makes you wait while loading, ask if you want to purchase the full version, or flashes it advertising, it is a small price to pay for being able to access the files.

The complete package for Stuffit (both platforms) allow the user to choose between the two formats. In case you haven't noticed, most of us on the Mac side uploading files, have gone to the zip format. Why, because it is a lot easier to just zip the files than it was to try and explain to the Windows users how to find the Free Expnander and use it.

Lee

frown.gif

Link to comment
Share on other sites

Lee Smith said:

In case you haven't noticed, most of us on the Mac side uploading files, have gone to the zip format. Why, because it is a lot easier to just zip the files than it was to try and explain to the Windows users how to find the Free Expnander and use it.

Lee

frown.gif

Case in point - the latter part of this thread. smile.gif

Would I expect it to do more than expand? no. Probably because it was named expander. In contrast, winzip allows you to compress and decompress. So does WinRAR. And guess what? they're both free.

Luckily I found out about Stuffit expander for windows on my own. I didn't have the good fortune of a Mac user to hold my hand and tell me where the free expander is and how use it. tongue.gif

Link to comment
Share on other sites

  • Newbies

Thanks you for zipping the file for me. I can open it now. I'll read through the other topic too, maybe there'll be some usefull information in it for me.

Thanks again

Florens.

BTW: I don't have any problems with Stuffit expander, I just didn't have it. smile.gif

Link to comment
Share on other sites

This topic is 6566 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.