Appendix A: System Routines — Math
827
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_shift
Declaration:
void
push_shift
(EStackIndex
i
, EStackIndex
j
)
Category(ies):
Math
Description:
Shifts the elements of an integer, a list, or a string to the left or right.
Inputs:
i
— EStackIndex of an integer, a list, or a string.
j
— EStackIndex of an integer or whole number float.
Outputs:
Pushes a shifted copy of
i
onto the estack.
If
i
is an integer, then the bits are shifted.
If
i
is a list, the elements of the list are shifted.
If
i
is a string, the characters of the string are shifted.
If
j
is positive, the shift is that number of places to the left.
If
j
is negative, the shift is that number of places to the right.
Each time an integer is shifted left, the leftmost bit is dropped, and a zero
bit is introduced on the right. Each time an integer is shifted right, the
rightmost bit is dropped, and the original leftmost bit (0 or 1) is copied on
the left.
Each time a list is shifted left or right, the appropriate element is dropped,
and the symbol
undef
is introduced at the opposite end of the list.
Each time a string is shifted left or right, the appropriate character is
dropped, and a space is introduced at the opposite end of the list.
Assumptions:
None
Side Effects:
May expand the estack, cause heap compression, or throw errors if
arguments are invalid.
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also: push_left, push_mid, push_right, push_rotate
(continued)