This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. 68k Calculator Basic => TI-BASIC
Author Message
Tiberious726


Advanced Member


Joined: 07 Oct 2005
Posts: 284

Posted: 08 Oct 2005 10:08:33 am    Post subject:

In TI 83 Basic there is a Menu( command that i found very useful. last year i got a TI-89-Titanium and could not find said command and have been forced to use many, many if-else statment in trying to port my programs... any help would be much appreciated... even a equivlent of C's Switch command would be helpful

thanks
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Oct 2005 11:03:14 am    Post subject:

The ToolBar..EndTBar command has the option to go to a label, but none of the others do.

However, the easiest-to-use menu is PopUp. It doesn't goto labels. Problem? not really. Here is code to go to a label:


Code:
Local choice
PopUp {"Item 1","Item 2","Item 3",...},choice
expr("Goto "&{"1st label","2nd label","3rd label",...}[choice])


You could easily adapt this code to other types of menus.

Edit: also, the TI-89 has advanced If blocks of the form

If condition Then
...
ElseIf condition Then
...
ElseIf condition Then
...
Else
...
End

(with any number of ElseIf's). This could be used instead of a switch statement.


Last edited by Guest on 08 Oct 2005 12:04:44 pm; edited 1 time in total
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement