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 nth
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.