Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mixing variable types in a numerical calculation
#9
Ok, thanks for the update

Below is the part of my code where I originally ran into this issue. I eventually arrived at the above example while painstakingly debugging it:

Code:
castleIntactAttr=(64*CAST(UINTEGER, PEEK (n+4))+8*skyCol+PEEK (n+5)+64*PEEK (n+6)+8*skyCol+PEEK (n+7))*2

Without that CAST, it just gives the wrong answer since all the PEEK results are UBYTE.
In the above expression, did I put the CAST in the correct location?
Reply


Messages In This Thread
RE: Mixing variable types in a numerical calculation - by patters - 01-05-2021, 04:44 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)