Hi, first of all I'm very new to programming (definitely on a calculator).
I'm making a program where you have to choose 1 or 2 in the beginning.
I want to make it like if you put 1, you Goto lbl 1 and do stuff, and the same with 2.

But I think Lbl only uses the command right next to it. While I need a chain of commands.
Does anyone know how to do this?

kind regards
Stoeptegelkip
Lbl just jumps to a location in your program and resumes execution from there: http://tibasicdev.wikidot.com/lbl

Welcome to Cemetech Smile
What does your code currently look like?
Labels basically move execution to that point, so

Code:
Goto 1
(other code)
Return
Lbl 1
Disp 1
Disp 2
Disp 3
Return

would print out 1 2 3

If you are not using the built-in Menu( command (which I recommend you do use) you might want to use If( statements instead of Gotos. For example,

Code:
Input A
If A=0
Then
Do stuff
Else
If A=1
Then
Do other stuff
End
End
Thank you both for the fast and great response! Very Happy
I forgot to put in 'Then' after 'If A=1', after putting it there my program works perfectly!
<3
Also, "Return" quits the program entirely unless the program itself was ran from another program.
  
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