The Disp and Output Commands for TI-84 Plus Programs

By Jeff McCalla, C. C. Edwards

The Disp and Output commands on the TI-84 Plus are used by a program to display text messages and values. The Disp command is capable of displaying more than one piece of information, and the Output command enables the program to place text or a value, but not both, at a predetermined location on the Home screen.

Using the Disp command

The syntax for using the Disp command to have a program display text and values is: Disp item1,item2,…,item n where item is either text or a value. The items appearing after this command are separated by commas with no spaces inserted after each comma. Text items must be in quotes, and value items can be arithmetic expressions, as in the last two lines of the first screen.

image0.jpg

When a program executes a Disp command, it places each item following the command on a separate line; text items are left justified and value items are right justified, as in the second screen.

The Home screen, where program output is displayed, can accommodate up to ten lines. If the Disp command in your program is going to result in more than ten lines, consider breaking it into several Disp commands separated by the Pause command.

Using the Output command

The syntax for using the Output command to have a program display text or a value at a specified location on the Home screen is: Output(line,column,item). The calculator supplies the first parenthesis; you must supply the last parenthesis. There are no spaces inserted after the commas.

The Home screen contains 10 lines and 26 columns. The item displayed by this command can be a text item or a value item. Text items must be in quotes, and a value item can be an arithmetic expression, as in the last four lines of the first screen.

image1.jpg

The program output resulting from executing this program is illustrated in the second screen. If you look closely at the screenshot, you may notice that the parenthesis in the last line of the program is not closed: Output(6,9,N+5.

Closing the parenthesis at the end of a line will have no bearing on the execution of the program. This is a convention that most programmers will use to save a tiny bit of space in the RAM of the calculator.

The Output command can be used to make text “wrap” to the next line, as shown in the second screen.