I'm pretty new to it-basic, and was wondering how to make the if command depend on the checktmr command
No, the If statement is not dependent on the checktmr command. whoops I misread your question!
You could use checktmr like this:

Code:
//stores 0 into variable A to prevent the code from not running when it encounters the Repeat loop
0→A
//starts the timer and stores the start time into variable X
startTmr→X
//This will continue to 'repeat' the following chunk of code until A equals 1
Repeat A=1

//<input your own code here if you want>

//Checks if the time since the timer was started is less than 5 seconds. If so then it stores 1 into variable A.  If it is not true, it will ignore the 1→A and continue running the rest of the code
If checkTmr(X)>5
//this simply stores the value 1 into variable A. Now when the code encounters the Repeat A=1 loop again, it will quit.
1→A

//<more of your code here if you want>

//you need an End statement to tell the Repeat loop "Hey, don't repeat any code pass this point!"
End
//displays that A now equals 1
Disp "True!


Smile
You can learn more about If statements Here and Here. Some great resources for learning BASIC are the Starter Kit, and the Command index on TiBasicDeveloper!
Thanks!
If you just want to wait until a certain amount of time has passed, you can use this (where X is the number of seconds you want to wait.:


Code:
startTmr
Repeat checkTmr(Ans)>X
End
  
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 1 of 1
» 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