#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    8
    Rep Power
    0

    help with decimal integers comparrison


    i've got a program wich does some calculations and has to make 2 numbers equal and that works just fine but when it has to see if the numbers are equal it just skips the check even though they are equal. I'm just using a simple function like:
    if nr1c == nr2c:
    but it won't work any idea why?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    51
    Hi!

    Are they really equal? Did you check it?

    If you showed us some code we could probably help better.

    Regards, mawe

    Comments on this post

    • Yegg` agrees
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    I'd be glad to help if you posted your code.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    ya the if thing it always checks for the True for the operation meaning if they are not equal it won't do anything of the block...

    Do something like

    print nr1c
    print nr2c
    if nr1c == nr2c:
    pass
    ...
    Those people who think they know everything are a great annoyance to those of us who do.

IMN logo majestic logo threadwatch logo seochat tools logo