How to Program a TI-83 Plus/Displaying Text

In this page, you will learn the many ways to display a string of text using TI-BASIC.

Mastering the Disp Function edit

If you've read the previous page, you already know about the Disp function. It lets you display text on the screen using the home menu. You can use it to display a string of 16 or fewer characters.

:Disp "JAWS THE SHARK"

You can also use it to display multiple strings of under 16 characters, separated by commas, which you can use to display long messages.

:Disp "JAWS THE SHARK","LURKING IN THE","DARK"

In fact, you can even display numbers using the Disp function.

:Disp "PI IS ABOUT",π,"BUT NOT EXACTLY"

However, there is one drawback to using Disp; it acts as if it's a regular equation typed into the terminal, and it will always display below the line that starts the program, which can provide clutter on the screen. One way we can avoid this, however, is with the ClrHome function.

Using the ClrHome function edit

The ClrHome function is incredibly simple; it just clears the screen for the code you're about to run.

:ClrHome
:Disp "JAWS IS HERE","HERE IS JAWS"

This will make it so that the text will always start at the top line of the screen, because the screen will be 100% clear for the Disp function.

Now, there is one more drawback to using the Disp function; it always starts at the left side of the screen. And while you can use the space key to start further right, there is a better solution. The Output() function.

Using the Output() function edit

The Output() function is similar to the Disp function in that it displays text on the home screen, but different in that the text displayed by it is always in a defined location. For example, take these two pieces of source code.

:Disp "AMITY ISLAND"
:Output(1,1,"AMITY ISLAND")

The code using Disp will appear below the message to execute the program, but the one using Output() will always have the text start in the upper left corner. You can make a piece of text appear anywhere on the screen. For example:

:Output(8,13,"BEES")

This piece of text will appear in the bottom right corner as the first character ("B") starts in the 8th row out of 8 and the 13th column out of 16, with the last character in the 16th column.

You may look at this and think that the Disp function is useless, as Output() can do many things better than Disp, however, there are a few situations in which Disp is far better.

Disp vs. Output() edit

One downside to Output() is that it doesn't support multiple arguments. For example, the code below is invalid.

:Output(2,3,"YOUR TOTAL IS:",40)

In that case, Disp would be far better.

:Disp "YOUR TOTAL IS:",40

Another use for Disp is saving storage, as it only needs the string and not the location parameters.

:Disp "HELLO" (8 bytes)
:Output(1,1,"HELLO") (12 bytes)

4 bytes may seem puny, but this is a calculator with only 24 kilobytes of readily accessible storage, so the 4 bytes you save may add up in the long run.

Aside from those 2 points, Output() is almost always better, as text can be placed anywhere you'd like on the screen. So, use Disp when you can/need to use multiple arguments, and Output() everywhere else.

Using the Pause function edit

To end this page, let's look at the Pause function.

Pause is somewhat similar to Disp, but there are a few differences. To start, just saying Pause on its own is a valid line of code.

:Pause

Secondly, Pause, well, pauses the program until you press ENTER.

:Disp "JAWS IS HERE"
:Pause 
:Disp "HERE IS JAWS

Pause can also be used like Disp, but it still pauses the program and it also only supports a single argument

:Pause "PAUSE IS HERE"
:Pause "HERE IS PAUSE"
:Pause "IT IS A COMMAND"
:Pause "WITHOUT A CAUSE"

Aside from that, Pause isn't an incredibly useful command, but it is fun to use.

Conclusion edit

Displaying plain text is one of the most basic forms of TI-BASIC, but it still provides a lot of fun. However, if you want to interact with a program further than pressing ENTER, you'll need to learn how to input information.

Click here to learn how to input information.