Remain(); Request - Texas Instruments TI-Nspire Reference Manual

Reference guide
Hide thumbs Also See for TI-Nspire:
Table of Contents

Advertisement

remain()

Value1
Value2
remain(
,
)
List1
List2
list
remain(
,
)
Matrix1
Matrix2
remain(
,
)
Returns the remainder of the first argument with respect to the
second argument as defined by the identities:
remain(x,0)
x
N
remain(x,y)
x
y·iPart(x/y)
As a consequence, note that remain(
result is either zero or it has the same sign as the first argument.
See also mod(), page 64.
Note:

Request

promptString
var
Request
,
promptString
func
Request
,
DispFlag
[, statusVar]]
[,
Programming command: Pauses the program and displays a dialog
box containing the message promptString and an input box for the
user's response.
When the user types a response and clicks
input box are assigned to variable var.
If the user clicks
, the program proceeds without accepting
Cancel
any input. The program uses the previous value of var if var was
already defined.
The optional DispFlag argument can be any expression.
If DispFlag is omitted or evaluates to
and user's response are displayed in the Calculator history.
If DispFlag evaluates to
displayed in the history.
statusVar
The optional
argument gives the program a way to
determine how the user dismissed the dialog box. Note that
requires the DispFlag argument.
If the user clicked
or pressed
OK
statusVar
is set to a value of
statusVar
Otherwise, variable
The func() argument allows a program to store the user's response as
a function definition. This syntax operates as if the user executed the
command:
Define func(arg1, ...argn) = user's response
The program can then use the defined function func(). The
promptString should guide the user to enter an appropriate
user's response that completes the function definition.
Note: You can use the Request command within a user-defined
program but not within a function.
To stop a program that contains a Request command inside an
infinite loop:
Windows®: Hold down the
repeatedly.
Macintosh®: Hold down the
repeatedly.
Handheld: Hold down the
repeatedly.
Note: See also RequestStr, page 84.
value
matrix
N
 N
x,y)
remain(x,y). The
DispFlag
[, statusVar]]
[,
arg1
...argn
(
,
)
, the contents of the
OK
, the prompt message
1
, the prompt and response are not
0
or
Enter
Ctrl+Enter
.
1
is set to a value of
.
0
key and press
F12
Enter
key and press
F5
Enter
c
·
key and press
Define a program:
Define request_demo()=Prgm
Request "Radius: ",r
Disp "Area = ",pi*r
EndPrgm
Run the program and type a response:
request_demo()
Result after selecting
Radius: 6/2
Area= 28.2743
Define a program:
statusVar
Define polynomial()=Prgm
Request "Enter a polynomial in x:",p(x)
Disp "Real roots are:",polyRoots(p(x),x)
, variable
EndPrgm
Run the program and type a response:
polynomial()
Result after selecting
Enter a polynomial in x: x^3+3x+1
Real roots are: {-0.322185}
TI-Nspire™ Reference Guide
Catalog >
Catalog >
2
:
OK
:
OK
83

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents