526
moved_between_to_top
Declaration:
EStackDisplacement moved_between_to_top (EStackIndex i ,
EStackIndex j )
Category(ies):
EStack Utilities
Description:
Copies elements from ( i + 1) through j to top of estack if space is available
or can be made available, then returns the number of elements copied
after deleting elements ( i + 1) through j .
Inputs:
i, j — Indexes into the estack.
Outputs:
Returns the number of quantums deleted.
Assumptions:
bottom_estack <= i and i <= j and j <= top_estack.
Side Effects:
The estack temporarily grows even though there is no net change in
top_estack. Consequently, an ESTACK_OVERFLOW_ERROR may be
thrown or heap compression may have occurred.
Availability:
On AMS 1.05 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
move_between_to_top
Example:
old_top = top_estack;
push_Float (3.7);
f = top_estack;
push_quantum_as_nonnegative_int (7u);
foo = top_estack;
push_quantum (8u);
delta = moved_between_to_top (old_top, f);
foo -= delta;
/* Adjust index of foo */
x = top_estack – delta;
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — EStack Utilities
/* Push variable x */
/* Adjust index of variable x */
Not for Distribution
/* Now f is on top */
Beta Version January 26, 2001