Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiplication result greater than 255 in UINTEGER var
#3
Hi

No worries. Yes it's been discussed before and will be changed in future releases.
ZXbasic does type promoting sometimes but not always. So by default when multiplying two Byte values it will get the result as a Byte hence truncating the result. You can enforce a typecast with CAST of one of the multiplication operands and this should fix it. Try using CAST(Uinteger, 32) and tell me. :wink:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)