Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,438 of 10,840    |
|    Allcomp to All    |
|    Very strange thing in VB6    |
|    27 Apr 05 10:35:31    |
      From: marc@nospam.allcomp.be              Hello,              I have seen something really strange in VB6              If I do a Int ( (5 * 1.2)) , I receive the value 5, but I should receive 6?       Is this a bug or something really "normal".       I can see that if I do       ? int ((5 * 1.2 + 0.0000000000000003))       I receive 6. If I add something smaller, I have 5 as a result       What is strange is that If I do a ? 5*1.2, I receive 6 so (5 * 1.2)       should do 6       If I do Int ( (5 * 12 / 10)), the result is OK (6)       What can I do to have it correct?       Is there an option in VB6?              Thank you       Marc Allard       Allcomp              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca