Texas Instruments TI-92 Calculator User Manual


 
Appendix A: Functions and Instructions 477
8992APPA.DOC TI-89 / TI-92 Plus: Appendix A (US English) Susan Gullord Revised: 02/23/01 1:48 PM Printed: 02/23/01 2:21 PM Page 477 of 132
part()
CATALOG
part(
expression1
[
,
nonNegativeInteger
]
)
This advanced programming function lets
you identify and extract all of the sub-
expressions in the simplified result of
expression1
.
For example, if
expression1
simplifies to
cos(
p
ù
x+3):
The
cos()
function has one argument:
(
p
ù
x+3).
The sum of (
p
ù
x+3) has two operands:
p
ù
x and 3.
The number 3 has no arguments or
operands.
The product
p
ù
x has two operands:
p
and x.
The variable x and the symbolic constant
p
have no arguments or operands.
If x has a numeric value and you press
¥¸
, the numeric value of
p
ù
x is
calculated, the result is added to 3, and then
the cosine is calculated.
cos()
is the
top-level
operator because it is applied
last
.
part(
expression1
)
number
Simplifies
expression1
and returns the number
of top-level arguments or operands. This
returns 0 if
expression1
is a number, variable,
or symbolic constant such as
p
,
e
,
i
, or
ˆ
.
part(cos(p
ù
x+3))
¸
1
Note:
cos(
p
ù
x+3) has one argument.
part(
expression1
, 0)
string
Simplifies
expression1
and returns a string
that contains the top-level function name or
operator. This returns
string(
expression1
)
if
expression1
is a number, variable, or symbolic
constant such as
p
,
e
,
i
, or
ˆ
.
part(cos(p
ù
x+3),0)
¸
"cos"
part(
expression1
,
n
)
expression
Simplifies
expression1
and returns the
n
th
argument or operand, where
n
is > 0 and
the number of top-level arguments or
operands returned by
part(
expression1
)
.
Otherwise, an error is returned.
part(cos(p
ù
x+3),1)
¸
3+p
ø
x
Note:
Simplification changed the order of
the argument.