| Posted: 08:52pm 11 Jun 2026 |
Copy link to clipboard |
 Print this post |
|
Thanks Peter as always!
Thanks Phil, you've woken me up to using the INC function as well! I figured you can get a decrement using INC variable, -1. Oh boy, when I think of the copious variable = variable + 1 and variable = variable - 1 in my code. Not only does INC look slick, the manual says it processes much faster.
I actually want bigger steps than 1 so I've ended up, as a demo for using both Up and Down keys, with:
dim float x dim string s$
x=10 do Do s$=Inkey$ Loop While s$="" If s$=Chr$(128) Then inc x,10:Print x If s$=Chr$(129) Then inc x,-10:Print x loop
|