bit, sbit
bit bit-array &rest subscripts → bit
sbit bit-array &rest subscripts → bit
(setf (bit bit-array &rest subscripts) new-bit)
(setf (sbit bit-array &rest subscripts) new-bit)
bit-array—for bit, a bit array; for sbit, a simple bit array.
subscripts—a list of valid array indices for the bit-array.
bit—a bit.
17.4.0 3
17.4.0 4bit and sbit access the bit-array element specified by subscripts.
!!! Is this necessary to say? How is it said elsewhere?These functions ignore the fill pointer when accessing elements.
This is implied by "access" above. 17.4.0 6 \macref{setf} can be used with \funref{bit} or \funref{sbit} to destructively replace a \term{bit array} \term{element} with a new value.
(bit (setq ba (make-array 8
:element-type 'bit
:initial-element 1))
3) → 1
(setf (bit ba 3) 0) → 0
(bit ba 3) → 0
(sbit ba 5) → 1
(setf (sbit ba 5) 1) → 1
(sbit ba 5) → 1
None.
None.
aref, Section 3.2.1 (Compiler Terminology)
17.4.0 7bit and sbit are like aref except that they require arrays to be a bit array and a simple bit array, respectively.
17.4.0 5bit and sbit, unlike char and schar, allow the first argument to be an array of any rank.