Calculator Home Screen
223
For example, suppose you want to create a function that sums a series of reciprocals
based on an entered integer (
n
):
When creating the definition of a multi-statement function, it may be helpful to visualize it
first in a block form.
Ê
Func
and
EndFunc
must begin and end the function.
Ë
Variables not in the argument list must be declared as local.
Ì
Returns a message if nn is not an integer or if nn
{
0.
Í
Sums the reciprocals.
Î
Returns the sum.
When entering a multi-statement function on the calculator Home screen, you must enter
the entire function on a single line. Use the
Define
command just as you would for a
single-statement function.
Ê
Ë
Ì
Í
Î
Ê
Func
Local temp,i
If fPart(nn)
ƒ
0 or nn
{
0
Return “bad argument”
0
!
temp
For i,nn,1,
M
1
approx(temp+1/i)
!
temp
EndFor
Return temp
EndFunc
1
n
---
1
n
1
–
------------ ... 1
1
---
+
+
+
Содержание Voyage 200
Страница 36: ...Getting Started 36 D B D B Press Result ...
Страница 45: ...Getting Started 45 3 0 D B D D B D Press Result ...
Страница 46: ...Getting Started 46 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Страница 60: ...Getting Started 60 B D Press Result ...
Страница 139: ...Previews 139 8 Complete the operation Press 2 d Steps and keystrokes Display 5 f 2 ...
Страница 181: ...Operating the Calculator 181 From the Keyboard From the Keyboard From the Keyboard From the Keyboard ...
Страница 453: ...Differential Equation Graphing 453 ...
Страница 468: ...Tables 468 ...
Страница 515: ...Split Screens 515 Note Both Top Bottom and Left Right splits use the same methods to select an application ...
Страница 777: ...Activities 777 ...