Texas Instruments TI-89 Titanium User Manual page 577

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

Advertisement

Use
. This is useful for
Return
exiting a function and returning a
value at some point other than
the end of the function.
This example calculates the cube if
Note:
The argument x is automatically treated as a local variable. However, if the example
needed another variable, the function would need to declare it as local by using the
Local command.
There is an implied
an error occurs.
Example of a Function
The following function returns the xth root of a value y (
to the function: x and y.
Programming
at the end of the function. If the last line is not an expression,
Return
:cube(x)
:Func
:If x<0
:
Return 0
:x^3
:EndFunc
; otherwise, it returns a
x
0
|
x
.
0
)
Two values must be passed
y
.
574

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents