User Manual - Page 142

For N3/TBL/1L1/J.

Loading ...
Loading ...
Loading ...
138 Alphabetical Listing
shift()
Catalog >
If #ofShifts is positive, the shift is to the
left. If #ofShifts is negative, the shift is to
the right. The default is 1 (shift right one
bit).
In a right shift, the rightmost bit is dropped
and 0 or 1 is inserted to match the leftmost
bit. In a left shift, the leftmost bit is
dropped and 0 is inserted as the rightmost
bit.
For example, in a right shift:
Each bit shifts right.
0b0000000000000111101011000011010
Inserts 0 if leftmost bit is 0,
or 1 if leftmost bit is 1.
produces:
0b00000000000000111101011000011010
The result is displayed according to the
Base mode. Leading zeros are not shown.
Important: To enter a binary or
hexadecimalnumber, always use the 0b or
0hprefix (zero, not the letter O).
shift(List1[,#ofShifts]) list
Returns a copy of List1 shifted right or left
by #ofShifts elements. Does not alter List1.
If #ofShifts is positive, the shift is to the
left. If #ofShifts is negative, the shift is to
the right. The default is 1 (shift right one
element).
Elements introduced at the beginning or
end of list by the shift are set to the symbol
“undef”.
In Dec base mode:
shift(String1[,#ofShifts]) string
Returns a copy of String1 shifted right or
left by #ofShifts characters. Does not alter
String1.
If #ofShifts is positive, the shift is to the
left. If #ofShifts is negative, the shift is to
the right. The default is 1 (shift right one
character).
Loading ...
Loading ...
Loading ...