Overview Of Entering A Function - Texas Instruments TI-89 Manual Book

Ti ti-89: user guide
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Overview of Entering a Function

Why Create a User-
Defined Function?
Note: You can create a
function from the Home
screen (see Chapter 5), but
the Program Editor is more
convenient for complex,
multi-line functions.
Differences
Between Functions
and Programs
Tip: For information about
local variables, refer to
pages 288 and 290.
A function created in the Program Editor is very similar to the
functions and instructions that you typically use from the Home
screen.
Functions (as well as programs) are ideal for repetitive calculations
or tasks. You only need to write the function once. Then you can
reuse it as many times as necessary. Functions, however, have some
advantages over programs.
¦
You can create functions that expand on the
built-in functions. You can then use the new functions the same
as any other function.
¦
Functions return values that can be graphed or entered in a table;
programs cannot.
¦
You can use a function (but not a program) within an expression.
For example:
3ù func1(3)
¦
Because you pass arguments to a function, you can write generic
functions that are not tied to specific variable names.
This guidebook sometimes uses the word command as a generic
reference to instructions and functions. When writing a function,
however, you must differentiate between instructions and functions.
A user-defined function:
¦
Can use the following instructions only. Any others are invalid.
Cycle
For...EndFor
Lbl
Return
¦
Can use all built-in
setFold
setTable
¦
Can refer to any variable; however, it can store a value to a local
variable only.
The arguments used to pass values to a function are treated as
local variables automatically. If you store to any other
variables, you must declare them as local from within the
function.
¦
Cannot call a program as a subroutine, but it can call another
user-defined function.
¦
Cannot define a program.
¦
Cannot define a global function, but it can define a local function.
is valid, but not
3ù prog1(3).
Define
Goto
Local
While...EndWhile
functions except:
TI-89 / TI-92 Plus
setGraph
switch
Chapter 17: Programming
's
TI-89 / TI-92 Plus
Exit
If...EndIf (all forms)
Loop...EndLoop
! ( §
key
)
setMode
285

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents