Appendix A: System Routines — Algebra Utilities
267
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
next_var_or_kernel_index
Declaration:
EStackIndex
next_var_or_kernel_index
(EStackIndex
i
, EStackIndex
vi
)
Category(ies):
Algebra Utilities
Description:
Returns
main_gen_var_index
(
i
) if
vi
= NULL_INDEX. Otherwise returns
an index of the variable or kernel in expression
i
that is next-most-main to
vi
, or returns NULL_INDEX if there is no such variable or kernel.
Inputs:
i
— Indexes the top tag of an internally-simplified algebraic expression.
vi
— Indexes NULL_INDEX or the top tag of an internally-simplified
variable or kernel.
Outputs:
Returns
main_gen_var_index
(
i
) if
vi
= NULL_INDEX. Otherwise returns
an index of the variable or kernel in expression
i
that is next-most-main to
vi
, or returns NULL_INDEX if there is no such variable or kernel.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: main_gen_var_index
Example:
void push_var_kern_tail (EStackIndex i)
/* i indexes an expression. Pushes onto the estack an END_TAG terminated
tail of its variables, with the most main deepest.
*/
{ EStackIndex vi = main_gen_var_index (i);
push_quantum (END_TAG);
while (vi)
{ push_expression (vi);
vi = next_var_or_kernel_index (i, vi);
}
}