getKey->K stores the return value of the function getKey (a number) into K (a variable). So, bflat's code with annotations (PS, bflat, you have an extra End on line 3):


Code:
:While K!=45 (45 is the key code for Clear)
When you get to the End, jump back to this While line as long as K is not equal to 45. Only once K becomes 45 (because CLEAR was pressed) can this While loop exit.

Code:
:GetKey -> K
:If K=11
If the key was Y=, then do "Do stuff here"

Code:
:Then
:Do stuff here
:End
:If K=12 (12 is the key code for Windows)
:Then
:Do stuff here
:End
Now it's time to loop back to the While, as long as K is not 45.
Code:
:End
Mkay, that works, but now i got another problem.

I need to make it so that when you press down/up it adds/subtracts 1 to "X" and then will move a line (-) with it so that the user sees what they're picking.


Does anyone see what I'm getting at?
Somewhere in there, add:
X-(K=34)+(K=25->X
When K=34, the statement (K=34) is true and therefore has arithmetic value 1; if K!=34, (K=34) = 0. Same for K=25. Therefore When K=34, this is like X-1+0->X, or X-1->X. When K=25, this is like X-0+1->X, or X+1->X.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement