05-28-2004, 10:16 AM
Barok,
INT rounds down, but QB converts a floating point to an integer by rounding to the nearest integer the same as using CINT. If the whole number part of the float is even it rounds .5 down. If the whole number part is odd it rounds .5 up.
Cheetah,
Usually QB would create this codeIt inserts the DEFINT statement on the line before the sub/function header. If it is doing it all on one line then you have a corrupted program.
INT rounds down, but QB converts a floating point to an integer by rounding to the nearest integer the same as using CINT. If the whole number part of the float is even it rounds .5 down. If the whole number part is odd it rounds .5 up.
Code:
0.5 -> 0
0.6 -> 1
1.4 -> 1
1.5 -> 2
Usually QB would create this code
Code:
DEFINT A-Z
FUNCTION something (x,y,z)
hrist Jesus came into the world to save sinners, of whom I am first.(I Timothy 1:15)
For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)
For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)