This is interesting.
This would have stumped me too.
Not sure why it hasn't before.
Quote: "Yes - basically AGK2 has "vague" expression typing with respect to integers and floats. If all the values in an expression are integers it will calculate it as an integer. If any are floats it will do it as a float. 10 and 3, being integers,means the result is 3.
AGK does not take note of the destination of the expression. If the result of the expression is an integer, it will cast it to a float if the destination is a float (hence printing 3.00000 - if you print(10/3) you'll get 3).
If it's a float, it casts it to an integer, this provides an int() functionality. (You could make a good case you should have an int() anyway).
This also applies to function parameters, you can SetSprite(1.2,3) for example (and it means 1), same with user functions. You could make a case this should generate a compiler warning (loss of data) "
Good to know,
Thanks
Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1