Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
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
Pogo


Newbie


Joined: 18 Sep 2007
Posts: 2

Posted: 18 Sep 2007 03:53:59 pm    Post subject:

I can't figure this out for the life of me. My programming experience is limited, to say the least, so please bear with me. It's a TI-89.

Ok, so I've been trying to put together a program to do a series of simple calculations based on a few inputs and display the results. For aesthetic reasons I've been trying to do this via dialog boxes and for whatever reason I cannot get the result to display in the box. Here's the basic form of the code:


Code:
Dialog
Request "number 1",a
Request "number 2",b
EndDlog
expr(a)->a
expr(b)->b
a+b->c
Dialog
Text "the result is ",c
EndDlog


The second to last line, Text "the result is ",c is the obvious problem; it doesn't work. I can start the program and enter the a and b values, but then it just gives me the message "Invalid in Dialog..EndDlog block". Trying to substitute Disp for Text gives the same error, but then it pops up right away, the program won't even start. I tried making c a string value just for the hell of it, but I can't get that to work either.

I can't seem to find a function that is valid for use within Dialog blocks and also allows you to tack on a variable for display. The TI-89 manual doesn't list such a function as far as I can see.

I've found a dirty work around for displaying the answer as a default option with both the DropDown and Request functions, but I'm looking for something more direct than that.

I'm sure there is a way to get a variable value to display in a dialog box, but I can't figure it out. Help?
Back to top
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 18 Sep 2007 04:13:25 pm    Post subject:

Change:
Text "the result is ",c
To:
Text "The result is "&string(c ), but omit the extra space inside the parenthesis.

Moderator, please move this topic to the 68k Basic section.


Last edited by Guest on 25 Sep 2010 02:49:17 pm; edited 1 time in total
Back to top
Pogo


Newbie


Joined: 18 Sep 2007
Posts: 2

Posted: 18 Sep 2007 04:18:53 pm    Post subject:

Awesome, thank you very much.
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 GMT - 5 Hours

 

Advertisement