Is this a bug??

Blitz3D Forums/Blitz3D Beginners Area/Is this a bug??

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

WarrenM is correct. Even though the first statement n#=1280/800 gives 'n' as a floating point variable, both of the numerics are integer class, so Blitz does integer math on them, then converts the result to floating point. By putting the decimal point on at least one of the numerics, you are telling Blitz to do both numbers as floating point, and then store the result in the n#.

BTW, if you did n=1280.00/800, noticing that 'n' is now an integer variable, Blitz will do the numerics as floating point, and then convert the result to the nearest integer result. The above gives an answer of 2 (not 1.6).