826
Appendix A: Functions and Instructions
The example Program Editor function to the right
uses
getType()
and
part()
to partially implement
symbolic differentiation. Studying and completing
this function can help teach you how to differentiate
manually. You could even include functions that the
cannot differentiate, such as Bessel functions.
:d(y,x)
:Func
:Local f
:If getType(y)="VAR"
: Return when(y=x,1,0,0)
:If part(y)=0
: Return 0
¦
y=
p
,
ˆ
,
i
,numbers
:part(y,0)
!
f
:If f="
L
"
¦
if negate
: Return
ë
d(part(y,1),x)
:If f="
−
"
¦
if minus
: Return d(part(y,1),x)
ì
d(part(y,2),x)
:If f="+"
: Return d(part(y,1),x)
+d(part(y,2),x)
:If f="
ù
"
: Return
part(y,1)
ù
d(part(y,2),x)
+part(y,2)
ù
d(part(y,1),x)
:If f="{"
: Return seq(d(part(y,k),x),
k,1,part(y))
:Return undef
:EndFunc
PassErr
CATALOG
PassErr
Passes an error to the next level.
If “errornum” is zero,
PassErr
does not do anything.
The
Else
clause in the program should use
ClrErr
or
PassErr
. If the error is to be processed or
ignored, use
ClrErr
. If what to do with the error is
not known, use
PassErr
to send it to the next error
handler. (See also
ClrErr
.)
See
ClrErr
program listing example.
Pause
CATALOG
Pause
[
expression
]
Suspends program execution. If you include
expression
, displays
expression
on the Program I/O
screen.
expression
can include conversion operations such
as
4
DD
and
4
Rect
. You can also use the
4
operator
to perform unit and number base conversions.
If the result of
expression
is too big to fit on a single
screen, you can use the cursor pad to scroll the
display.
Program execution resumes when you
press
¸
.
Program segment:
©
:ClrIO
:DelVar temp
:1
"
temp[1]
:1
"
temp[2]
:Disp temp[2]
:
¦
Guess the Pattern
:For i,3,20
: temp[i
ì
2]+temp[i
ì
1]
"
temp[i]
: Disp temp[i]
: Disp temp,"Can you guess the
next","number?"
: Pause
:EndFor
©
Содержание Titanium TI-89
Страница 9: ...Getting Started 6 TI 89 Titanium keys Ë Ì Í Ê ...
Страница 34: ...Getting Started 31 2 or D 2 B u s i n e s s D B D B Press Result ...
Страница 43: ...Getting Started 40 3 0 D B D D B D Press Result ...
Страница 44: ...Getting Started 41 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Страница 58: ...Getting Started 55 Example Set split screen mode to TOP BOTTOM Press Result 3 B D ...
Страница 70: ...Getting Started 67 ...
Страница 175: ...Operating the Calculator 172 From the Keyboard ...
Страница 456: ...Tables 453 ...
Страница 503: ...Split Screens 500 Note Both Top Bottom and Left Right splits use the same methods to select an application ...
Страница 527: ...Data Matrix Editor 524 ...
Страница 704: ...Connectivity 701 A TI 89 Titanium and a Voyage 200 linked together I O Port I O Port I O unit to unit cable ...