ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   15 Arrays   15.2 Dictionary of Arrays

15.2.33 bit, sbit Accessor

Syntax:
bit bit-array &rest subscripts bit
sbit bit-array &rest subscripts new-bit

(setf(bit bit-array &rest subscrips) new-bit)
(setf(sbit bit-array &rest subscrips) new-bit)

Arguments and Values:
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.

Description:
bit and sbit access the bit-array element specified by subscripts.

These functions ignore the fill pointer when accessing elements.

Examples:
 (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

See Also:
aref, Section 3.2.1 Compiler Terminology

Notes:
bit and sbit are like aref except that they require arrays to be a bit array and a simple bit array, respectively.

bit and sbit, unlike char and schar, allow the first argument to be an array of any rank.

Allegro CL Implementation Details:
None.

Home Previous Up Next Table of Contents Index
© Franz Inc. 1998-2019 - File last updated 02-07-2019