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

Lesson 5 - Variables and subsequent moving of objects



    Variables are another very powerful asset that Ti-86 BASIC users have.   They can be used to move objects, randomly do something, etc.  I will give a few examples to get the ball rolling.

    To move "Hi" from the left to the right side of the homescreen.

:ClLCD                     ;Clears the home screen
:1->A                        ;Stores 1 to the variable "A"
:Lbl Top                   ;Identifies label Top
:Outpt(2,A,"Hi"      ;Outpt(2,A - A stands for 1, then two, etc.
:For(I,1,200            ;For counts from 1 to 200 before continuing to ClLCD
:End                         ;Ends the "For" statement
:ClLCD                    ;Clears the homescreen
:A+1->A                 ;Adds one to variable "A"
:If A==19               ;If A is equal to 19, then it stops, otherwise, is goes to Top
:Stop
:Goto Top

    So, variables can be used to move objects.  If you want things to move on the graph screen, replace outpt with text and remove the For statement.  This concept is simple, but what you do with it can be cool.  Download Saver to find out the cool uses.