Appendix A: System Routines — EStack Utilities
525
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
move_between_to_top
Declaration:
void
move_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. Elements (
i
+ 1) through
j
are then deleted.
Inputs:
i
,
j
— Indexes into the estack.
Outputs:
None
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: moved_between_to_top
Example:
old_top = top_estack;
push_Float (3.7);
f = top_estack;
push_quantum_as_nonnegative_int (7u);
move_between_to_top (old_top, f);
/* Now the float 3.7 is on top of the integer 7. */