09-26-2023, 06:31 AM
(09-26-2023, 02:16 AM)SMcNeill Wrote:I see what I did. I was misusing the DIM...AS... statement with a variable list. It's something I remember from way back, using that with lists of variables can give unexpected results and it's safer and no more difficult to declare variables one at a time. Thanks again!(09-26-2023, 12:58 AM)DimColby Wrote:(09-26-2023, 12:25 AM)SMcNeill Wrote: 1.677722E+07 is floating point, and you're at max single digit precision.Thank you, I think that fixed it. It turns out that declaring it with a DIM didn't really do it, but not declaring it and using the & suffix did.
16777220 <-- this is what the value above translates to.
16777221 <-- add one
1.677722E+07 <-- and the above still rounds to the same value.
You're doing floating point math, not integer addition.
Those two things must not be exactly the same.
Can you share some code with the glitch? & suffix is the same as DIM AS LONG. I imagine you're seeing an issue with your variable's scope.