Site hosted by Angelfire.com: Build your free website today!
Back to Main

Input/Output Basics


:Disp "Hello everyone!"

Note that this tag will display (hence the tag's name: disp ) this text on the screen , top-left of the screen. However, if the number of characters exceed 16 ( in this case there are 15 , spaces count as one ) then the text will be cut off and you will not be able to see it all.

:Output(X,Y,"Hello!")

The Output tag, the most useful tool when it comes to displaying anything. X and Y are the coordinates on the screen where u want the string to start. The limit will change according to where you start displaying the string.

Disp Advanced Use

:Disp"Hello"
:Disp"Hi"
is the same as:
:Disp"Hello","Hi"

:DispX
Displays the value stored in the variable.

Output Advanced Use
:Output(X,Y,A)
Uses X and Y as coordinates, and displays the value stored in variable A at that location.

:Input X
or
:Input "Enter X:" , X

Note: A variable is a character from A-Z including theta.

The Input tag is needed to receive a value from the user. The 'X' can be any variable , and is the location in which the value is stored. The display will look like this:
Enter X:?
The program will wait till theres a value given. The Prompt tag has a similar function, but it can't have a text request like Input can, which is why Input is the one i prefer to use in my programs.

:Prompt X

Very similar to Input X except the display on the screen will be:
X=?
It also serves the same purpose. Stores a value to a variable.

:ClrHome

A necessity with almost every program. This clears the home screen of ALL characters, no matter how many.
:Pause

Pauses screen and waits for the user to press enter.
Back to TI-Basic Page
Continue to Conditions & Loops