-
-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
Description
Contact Details
No response
Compiler version
v1.18.5
What happened?
When a fixed variable is converted to long by using int or cast, the result is incorrect.
dim var_fix as fixed = 1.5
' These statements print incorrect result "-2147483647":
print int(var_fix)
print cast(long, var_fix)
' These, however, give the correct result "1":
print cast(integer, var_fix)
print cast(byte, var_fix)
' Also correct when using a constant, prints the correct result "1":
const const_fix as fixed = 1.5
print int(const_fix)
print cast(long, const_fix)Error and Warning messages
Code of Conduct
- I agree to follow this project's Code of Conduct