Appendix A: Functions and Instructions
863
remain()
MATH/Number menu
remain(
expression1
,
expression2
)
⇒
⇒
⇒
⇒
expression
remain(
list1
,
list2
)
⇒
⇒
⇒
⇒
list
remain(
matrix1
,
matrix2
)
⇒
⇒
⇒
⇒
matrix
Returns the remainder of the first argument with
respect to the second argument as defined by the
identities:
remain(x,0)
x
remain(x,y)
x
ì
y
ù
iPart(x/y)
remain(7,0)
¸
7
remain(7,3)
¸
1
remain(
ë
7,3)
¸
ë
1
remain(7,
ë
3)
¸
1
remain(
ë
7,
ë
3)
¸
ë
1
remain({12,
ë
14,16},{9,7,
ë
5})
¸
{3 0 1}
As a consequence, note that
remain(
ì
x,y
)
ì
remain(
x,y
)
. The result is either zero or it has
the same sign as the first argument.
Note:
See also
mod()
.
remain([9,
ë
7;6,4],[4,3;4,
ë
3])
¸
[
1
ë
1
2 1
]
Rename
CATALOG
Rename
oldVarName
,
newVarName
Renames the variable
oldVarName
as
newVarName
.
{1,2,3,4}
!
L1
¸
{1,2,3,4}
Rename L1, list1
¸
Done
list1
¸
{1,2,3,4}
Request
CATALOG
Request
promptString
,
,
,
,
var
[
,alphaOn/Off
]
If Request is inside a Dialog...EndDlog construct, it
creates an input box for the user to type in data. If it
is a stand-alone instruction, it creates a dialog box
for this input. In either case, if var contains a string,
it is displayed and highlighted in the input box as a
default choice. promptString must be
{
20
characters.
This instruction can be stand-alone or part of a
dialog construct.
Request "Enter text",t,1
¸
The argument turned on alpha-lock in the
above example.
The optional alphaOn/Off argument can be any
expression. If it evaluates to zero, alpha-lock is set
to OFF. If it evaluates to anything other than zero,
alpha-lock is set to ON. If the optional argument is
not used, alpha-lock defaults to ON.
If more than one Request command appears within
a Dialog...EndDlog construct, the first alpha setting
is used and subsequent ones are ignored.
Request “Enter number”,n,0
The argument turned off alpha-lock in the
above example.
Return
CATALOG
Return [
expression
]
Returns
expression
as the result of the function.
Use within a
Func
...
EndFunc
block, or
Prgm
...
EndPrgm
block.
Note
: Use
Return
without an argument to exit a
program.
Note:
Enter the text as one long line on the
Home screen (without line breaks).
Define factoral(nn)=Func
:local answer,count:1
!
answer
:For count,1,nn
:answer
ù
count
!
answer:EndFor
:Return answer:EndFunc
¸
Done
factoral(3)
¸
6
Summary of Contents for Voyage 200
Page 36: ...Getting Started 36 D B D B Press Result ...
Page 45: ...Getting Started 45 3 0 D B D D B D Press Result ...
Page 46: ...Getting Started 46 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Page 60: ...Getting Started 60 B D Press Result ...
Page 139: ...Previews 139 8 Complete the operation Press 2 d Steps and keystrokes Display 5 f 2 ...
Page 453: ...Differential Equation Graphing 453 ...
Page 468: ...Tables 468 ...
Page 777: ...Activities 777 ...