2

I have a program on my TI-89 Titanium that displays text. It works fine until the text becomes too long, and I get "Error: Dimension". How can I circumvent this, or perhaps split the text into multiple dialogs?

Here's an example:

Text "A short string that fits." Text "A very long string that will not fit on a normal dialog!"

vpzomtrrfrt
  • 483
  • 6
  • 16
  • It would be very helpful if you could share your code and a bit more details of what you are doing? Thanks! – PGmath Nov 11 '14 at 15:04

1 Answers1

0

I would suggest using the Dialog, EndDialog command as opposed to Text. Text can simply handle one line of no more than 37 characters, but really usually much more than 30 characters will run off the dialing and be invisible. The Dialog, EndDialog is much more robust, it can take a Title and multiple lines of Text, Request, and DropDown. Here is an example:

:Dialog
: Title "Some title text"
: Text "Some informational text"
: Text "Another line of informational text"
:EndDialog

You can also, as mentioned above use Request and DropDown lines as well.

If you have a variable containing a string of variable length to display you can do something like this:

:"String that is too long to fit on one line."→txt
:Dialog
: Title "Some title text"
: Text left(txt,30)
: Text right(txt,dim(txt)-30)
:EndDialog

The left(str,n) will return the n leftmost characters of str, similarly right(str,n) will return the n rightmost characters of str. Dim(str) will return the number of characters in str.

You can read more about Dialog, EndDialog here.

PGmath
  • 381
  • 3
  • 16