TI 83 BASIC Tutorial

Chapter 4 | Table of contents

Output and Input

Welcome to chapter 4, output and input. In this lesson, I will show you how to create programs that accept information from the user and output information to the screen.

Output

Output is defined as displaying processed data to the screen. In other words, It is showing the result of something we had our program do. Another way to say this is, output tells us what the calculator did. On the TI 83 there are two primary ways to display output: Disp or Output(.

DISP

Don't disp me man! ...

Or was that dis. Anyway, Disp is command in TI-BASIC to display text and/or a variable to screen. The following are valid Disp commands:

  1. Disp A - This displays the contents of variable A
  2. Disp "VAR A IS:", A - This displays the contents of variable A
  3. Disp "HELLO" - This displays "HELLO" to the screen

To demostrate this, we will write a program that will add 2 and 2, and display the result. (I know this may seem stupid, but I want to keep it simple.)

Before we start using the calculators, let us figure out how we are going to make this program. What do we need to do? First of all we need to add 2 and 2 and store it in a variable. Second, we need to display the contents of that variable. Lets us something we call psuedocode, that is human readable instructions. Here is an example:

ANSWER equals 2 + 2
Display ANSWER

Now I know this seems like a lot of BS for a simple problem, but latter on, when programs are tens, to hundreds of lines long, and the algorithms, the way the problem is solvedm, get complex, you will want pseudocode.

Now let's make our pseudcode real code, that is something we can type in our calculator. It will look like this:
PROGRAM:CH4P1
:2+2->a
:disp "2+2 IS",A

Working on the rest of this tutorial... sorry for the inconvience.