03-13-2011, 02:10 PM
LCD Wrote:Surely the solution is a cast?gives me back 247. Why is this a Problem? PEEK 3 is 255, so (PEEK 3)*9 should be calculated as 255*9=2295, so it looks like the result of this calculation is stored in UBYTE. No problem because PEEK gives back UBYTE, but a multiplication is a little bit more problematic.Code:print at 17,0;(peek 3)*9
Code:
print at 17,0;CAST(uInteger,(peek 3))*9
I haven't tried it, but that seems to me the logical way to kick it up to an integer over a byte type when it returns something smaller than you need?