What Causes An Undefined Variable Error Message - Texas Instruments TI-89 Titanium User Manual

Hide thumbs Also See for TI-89 Titanium:
Table of Contents

Advertisement

Ê
Declares variable i as local.
As often as possible, use local variables for any variable that is used only within a
Note:
program and does not need to be stored after the program stops.
If you declare variable
that it does not use up memory.

What Causes an Undefined Variable Error Message?

An
variable error message displays when you evaluate a user-defined
Undefined
function or run a user-defined program that references a local variable that is not
initialized (assigned a value).
This example is a multi-statement function, rather than a program. Line breaks are
shown here, but you would type the text in the entry line as one continuous line, such as:
Define fact(n)=Func:Local...
screen.
For example:
Define fact(n)=Func:
Ê
Local m:
While n>1:
n†m!m: n–1!n:
EndWhile:
Return m:
EndFunc
Ê
Local variable m is not assigned an initial value.
Programming
as local, it is deleted automatically when the program stops so
i
where the ellipsis indicates the entry line text continues off-
583

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents