Programming Language - Common Lisp 15. Arrays
Programming Language - Common Lisp 15. Arrays
Programming Language - Common Lisp 15. Arrays
15. Arrays
Compound Type Specier Description: If element-type is the symbol *, vectors are not excluded on the basis of their element type . Oth-
This compound type specier is treated exactly as the corresponding compound type specier for erwise, only those vectors are included whose actual array element type is the result of upgrading
type array would be treated, except that the set is further constrained to include only simple element-type ; see Section 15.1.2.1 (Array Upgrading).
arrays . If a size is specied, the set includes only those vectors whose only dimension is size . If the
Notes: symbol * is specied instead of a size , the set is not restricted on the basis of dimension .
It is implementation-dependent whether displaced arrays , vectors with ll pointers , or arrays that
are actually adjustable are simple arrays . See Also:
Section 15.1.2.2 (Required Kinds of Specialized Arrays), Section 2.4.8.3 (Sharpsign Left-
(simple-array *) refers to all simple arrays regardless of element type, (simple-array type- Parenthesis), Section 22.1.3.7 (Printing Other Vectors), Section 2.4.8.12 (Sharpsign A)
specier ) refers only to those simple arrays that can result from giving type-specier as the
:element-type argument to make-array . Notes:
The type (vector e s ) is equivalent to the type (array e (s )).
vector System Class The type (vector bit) has the name bit-vector.
The union of all types (vector C ), where C is any subtype of character, has the name string.
Class Precedence List: (vector *) refers to all vectors regardless of element type, (vector type-specier ) refers only
to those vectors that can result from giving type-specier as the :element-type argument to
vector, array , sequence, t make-array .
Description:
Any one-dimensional array is a vector .
The type vector is a subtype of type array ; for all types x, (vector x) is the same as (array x
simple-vector Type
(*)).
The type (vector t), the type string, and the type bit-vector are disjoint subtypes of type vector. Supertypes:
simple-vector, vector, simple-array, array , sequence, t
Compound Type Specier Kind: Description:
Specializing. The type of a vector that is not displaced to another array , has no ll pointer , is not expressly
Compound Type Specier Syntax: adjustable and is able to hold elements of any type is a subtype of type simple-vector.
(vector [felement-type j *g [fsize j *g]]) The type simple-vector is a subtype of type vector, and is a subtype of type (vector t).
Compound Type Specier Arguments: Compound Type Specier Kind:
Specializing.
size |a non-negative xnum .
element-type |a type specier . Compound Type Specier Syntax:
(simple-vector [ size ])
Compound Type Specier Description:
This denotes the set of specialized vectors whose element type and dimension match the specied Compound Type Specier Arguments:
values. Specically: size |a non-negative xnum , or the symbol *. The default is the symbol *.
Supertypes:
bit-vector System Class simple-bit-vector, bit-vector, vector, simple-array, array , sequence, t
Description:
Class Precedence List: The type of a bit vector that is not displaced to another array , has no ll pointer , and is not
expressly adjustable is a subtype of type simple-bit-vector.
bit-vector, vector, array , sequence, t
Description: Compound Type Specier Kind:
A bit vector is a vector the element type of which is bit . Abbreviating.
The type bit-vector is a subtype of type vector, for bit-vector means (vector bit). Compound Type Specier Syntax:
(simple-bit-vector [ size ])
Compound Type Specier Kind:
Abbreviating. Compound Type Specier Arguments:
Compound Type Specier Syntax: size |a non-negative xnum , or the symbol *. The default is the symbol *.
(bit-vector [ size ]) Compound Type Specier Description:
This denotes the same type as the type (simple-array bit (size )); that is, the set of simple bit
Compound Type Specier Arguments: vectors of size size .
size |a non-negative xnum , or the symbol *.
Compound Type Specier Description:
This denotes the same type as the type (array bit (size )); that is, the set of bit vectors of size
make-array Function
size .
See Also: Syntax:
make-array dimensions &key element-type
Section 2.4.8.4 (Sharpsign Asterisk), Section 22.1.3.6 (Printing Bit Vectors), Section 15.1.2.2 initial-element
(Required Kinds of Specialized Arrays) initial-contents
adjustable
ll-pointer
displaced-to
displaced-index-oset
! new-array
Arguments and Values:
dimensions |a designator for a list of valid array dimensions .
element-type |a type specier . The default is t.
initial-element |an object .
make-array make-array
initial-contents |an object . the array is not expressly adjustable (and it is implementation-dependent whether the array is
actually adjustable ).
adjustable |a generalized boolean . The default is nil.
If ll-pointer is non-nil , the array must be one-dimensional; that is, the array must be a vector .
ll-pointer |a valid ll pointer for the array to be created, or t or nil. The default is nil. If ll-pointer is t, the length of the vector is used to initialize the ll pointer . If ll-pointer is an
displaced-to |an array or nil. The default is nil. This option must not be supplied if either integer , it becomes the initial ll pointer for the vector .
initial-element or initial-contents is supplied. If displaced-to is non-nil , make-array will create a displaced array and displaced-to is the target of
displaced-index-oset |a valid array row-major index for displaced-to . The default is 0. This that displaced array . In that case, the consequences are undened if the actual array element type
option must not be supplied unless a non-nil displaced-to is supplied. of displaced-to is not type equivalent to the actual array element type of the array being created.
If displaced-to is nil, the array is not a displaced array .
new-array |an array .
The displaced-index-oset is made to be the index oset of the array . When an array A is given
Description: as the :displaced-to argument to make-array when creating array B, then array B is said to be
Creates and returns an array constructed of the most specialized type that can accommodate displaced to array A. The total number of elements in an array , called the total size of the array ,
elements of type given by element-type . If dimensions is nil then a zero-dimensional array is is calculated as the product of all the dimensions. It is required that the total size of A be no
created. smaller than the sum of the total size of B plus the oset n supplied by the displaced-index-oset .
The eect of displacing is that array B does not have any elements of its own, but instead maps
Dimensions represents the dimensionality of the new array . accesses to itself into accesses to array A. The mapping treats both arrays as if they were one-
dimensional by taking the elements in row-major order, and then maps an access to element k of
element-type indicates the type of the elements intended to be stored in the new-array . The new- array B to an access to element k+n of array A.
array can actually store any objects of the type which results from upgrading element-type ; see
Section 15.1.2.1 (Array Upgrading). If make-array is called with adjustable , ll-pointer , and displaced-to each nil, then the result is a
simple array . If make-array is called with one or more of adjustable , ll-pointer , or displaced-to
If initial-element is supplied, it is used to initialize each element of new-array . If initial-element being true , whether the resulting array is a simple array is implementation-dependent .
is supplied, it must be of the type given by element-type . initial-element cannot be supplied if
either the :initial-contents option is supplied or displaced-to is non-nil . If initial-element is not When an array A is given as the :displaced-to argument to make-array when creating array B,
supplied, the consequences of later reading an uninitialized element of new-array are undened then array B is said to be displaced to array A. The total number of elements in an array , called
unless either initial-contents is supplied or displaced-to is non-nil . the total size of the array , is calculated as the product of all the dimensions. The consequences
are unspecied if the total size of A is smaller than the sum of the total size of B plus the oset
initial-contents is used to initialize the contents of array . For example: n supplied by the displaced-index-oset . The eect of displacing is that array B does not have any
(make-array '(4 2 3) :initial-contents elements of its own, but instead maps accesses to itself into accesses to array A. The mapping
'(((a b c) (1 2 3)) treats both arrays as if they were one-dimensional by taking the elements in row-major order, and
((d e f) (3 1 2)) then maps an access to element k of array B to an access to element k+n of array A.
((g h i) (2 3 1))
((j k l) (0 0 0))))
Examples:
initial-contents is composed of a nested structure of sequences . The numbers of levels in the struc- (make-array 5) ;; Creates a one-dimensional array of five elements.
ture must equal the rank of array . Each leaf of the nested structure must be of the type given by (make-array '(3 4) :element-type '(mod 16)) ;; Creates a
element-type . If array is zero-dimensional, then initial-contents species the single element . Other- ;;two-dimensional array, 3 by 4, with four-bit elements.
wise, initial-contents must be a sequence whose length is equal to the rst dimension; each element (make-array 5 :element-type 'single-float) ;; Creates an array of single-floats.
must be a nested structure for an array whose dimensions are the remaining dimensions, and so
on. Initial-contents cannot be supplied if either initial-element is supplied or displaced-to is non-nil . (make-array nil :initial-element nil) !
#0ANIL
If initial-contents is not supplied, the consequences of later reading an uninitialized element of (make-array 4 :initial-element nil) !
#(NIL NIL NIL NIL)
new-array are undened unless either initial-element is supplied or displaced-to is non-nil . (make-array '(2 4)
:element-type '(unsigned-byte 2)
If adjustable is non-nil , the array is expressly adjustable (and so actually adjustable ); otherwise,
make-array
:initial-contents '((0 1 2 3) (3 2 1 0))) (setq a3 (make-array 50 :fill-pointer 10))
! #2A((0 1 2 3) (3 2 1 0)) ! #<ARRAY 50 fill-pointer 10 46105663>
(make-array 6 (setq b3 (make-array 20 :displaced-to a3 :displaced-index-offset 10
:element-type 'character :fill-pointer 5))
:initial-element #\a ! #<ARRAY 20 indirect, fill-pointer 5 46107432>
:fill-pointer 3) ! "aaa" (length a3) !10
(length b3) !5
The following is an example of making a displaced array .
(setq a (make-array '(4 3)))
See Also:
! #<ARRAY 4x3 simple 32546632> adjustable-array-p, aref , arrayp, array-element-type, array-rank-limit, array-dimension-limit,
(dotimes (i 4) ll-pointer, upgraded-array-element-type
(dotimes (j 3)
(setf (aref a i j) (list i 'x j '= (* i j)))))
Notes:
! NIL There is no specied way to create an array for which adjustable-array-p denitely returns false .
(setq b (make-array 8 :displaced-to a There is no specied way to create an array that is not a simple array .
:displaced-index-offset 2))
! #<ARRAY 8 indirect 32550757>
(dotimes (i 8)
(print (list i (aref b i))))
adjust-array Function
. (0 (0 X 2 = 0))
. (1 (1 X 0 = 0)) Syntax:
. (2 (1 X 1 = 1)) adjust-array array new-dimensions &key element-type
. (3 (1 X 2 = 2)) initial-element
. (4 (2 X 0 = 0)) initial-contents
. (5 (2 X 1 = 2)) ll-pointer
. (6 (2 X 2 = 4)) displaced-to
. (7 (3 X 0 = 0)) displaced-index-oset
! NIL
The last example depends on the fact that arrays are, in eect, stored in row-major order. ! adjusted-array
(setq a1 (make-array 50))
Arguments and Values:
! #<ARRAY 50 simple 32562043> array |an array .
(setq b1 (make-array 20 :displaced-to a1 :displaced-index-offset 10))
! #<ARRAY 20 indirect 32563346> new-dimensions |a valid array dimension or a list of valid array dimensions .
(length b1) ! 20 element-type |a type specier .
(setq a2 (make-array 50 :fill-pointer 10)) initial-element |an object . Initial-element must not be supplied if either initial-contents or
! #<ARRAY 50 fill-pointer 10 46100216> displaced-to is supplied.
(setq b2 (make-array 20 :displaced-to a2 :displaced-index-offset 10))
! #<ARRAY 20 indirect 46104010> initial-contents |an object . If array has rank greater than zero, then initial-contents is composed
(length a2) ! 10
of nested sequences , the depth of which must equal the rank of array . Otherwise, array is zero-
(length b2) ! 20 dimensional and initial-contents supplies the single element. initial-contents must not be supplied if
either initial-element or displaced-to is given.
ll-pointer |a valid ll pointer for the array to be created, or t, or nil. The default is nil.
adjust-array adjust-array
displaced-to |an array or nil. initial-elements and initial-contents must not be supplied if displaced- A is displaced to B before the call, and is displaced to C after the call
to is supplied.
(adjust-array A ... :displaced-to B)
displaced-index-oset |an object of type (fixnum 0 n) where n is (array-total-size displaced-to ). (adjust-array A ... :displaced-to C)
displaced-index-oset may be supplied only if displaced-to is supplied.
B and C might be the same. The contents of B do not appear in A afterward unless
adjusted-array |an array . such contents also happen to be in C If displaced-index-oset is not supplied in the
adjust-array call, it defaults to zero; the old oset into B is not retained.
Description:
adjust-array changes the dimensions or elements of array . The result is an array of the same type A is displaced to B before the call, but not displaced afterward.
and rank as array , that is either the modied array , or a newly created array to which array can
be displaced, and that has the given new-dimensions . (adjust-array A ... :displaced-to B)
(adjust-array A ... :displaced-to nil)
New-dimensions specify the size of each dimension of array .
A gets a new \data region," and contents of B are copied into it as appropriate to main-
Element-type species the type of the elements of the resulting array . If element-type is supplied, tain the existing old contents; additional elements of A are taken from initial-element if
the consequences are unspecied if the upgraded array element type of element-type is not the supplied. However, the use of initial-contents causes all old contents to be discarded.
same as the actual array element type of array .
If displaced-index-oset is supplied, it species the oset of the resulting array from the beginning
If initial-contents is supplied, it is treated as for make-array . In this case none of the original of the array that it is displaced to. If displaced-index-oset is not supplied, the oset is 0. The
contents of array appears in the resulting array . size of the resulting array plus the oset value cannot exceed the size of the array that it is
displaced to.
If ll-pointer is an integer , it becomes the ll pointer for the resulting array . If ll-pointer is the
symbol t, it indicates that the size of the resulting array should be used as the ll pointer . If If only new-dimensions and an initial-element argument are supplied, those elements of array that
ll-pointer is nil, it indicates that the ll pointer should be left as it is. are still in bounds appear in the resulting array . The elements of the resulting array that are
not in the bounds of array are initialized to initial-element ; if initial-element is not provided, the
If displaced-to non-nil , a displaced array is created. The resulting array shares its contents consequences of later reading any such new element of new-array before it has been initialized are
with the array given by displaced-to . The resulting array cannot contain more elements than undened.
the array it is displaced to. If displaced-to is not supplied or nil, the resulting array is not a
displaced array . If array A is created displaced to array B and subsequently array B is given If initial-contents or displaced-to is supplied, then none of the original contents of array appears in
to adjust-array , array A will still be displaced to array B . Although array might be a displaced the new array .
array , the resulting array is not a displaced array unless displaced-to is supplied and not nil.
The interaction between adjust-array and displaced arrays is as follows given three arrays , A, B, The consequences are unspecied if array is adjusted to a size smaller than its ll pointer without
and C: supplying the ll-pointer argument so that its ll-pointer is properly adjusted in the process.
If A is displaced to B, the consequences are unspecied if B is adjusted in such a way that it no
A is not displaced before or after the call longer has enough elements to satisfy A.
(adjust-array A ...) If adjust-array is applied to an array that is actually adjustable , the array returned is identical
The dimensions of A are altered, and the contents rearranged as appropriate. Additional to array . If the array returned by adjust-array is distinct from array , then the argument array is
elements of A are taken from initial-element . The use of initial-contents causes all old unchanged.
contents to be discarded. Note that if an array A is displaced to another array B , and B is displaced to another array C ,
and B is altered by adjust-array , A must now refer to the adjust contents of B . This means that
A is not displaced before, but is displaced to C after the call an implementation cannot collapse the chain to make A refer to C directly and forget that the
(adjust-array A ... :displaced-to C)
chain of reference passes through B . However, caching techniques are permitted as long as they
preserve the semantics specied here.
None of the original contents of A appears in A afterwards; A now contains the contents of
C, without any rearrangement of C.
Description: Examples:
Accesses the array element specied by the subscripts . If no subscripts are supplied and array is
zero rank, aref accesses the sole element of array . (array-dimension (make-array 4) 0) 4 !
(array-dimension (make-array '(2 3)) 1) ! 3
aref ignores ll pointers . It is permissible to use aref to access any array element , whether active
or not. Aected By:
None.
Examples:
If the variable foo names a 3-by-5 array, then the rst index could be 0, 1, or 2, and then second See Also:
index could be 0, 1, 2, 3, or 4. The array elements can be referred to by using the function aref ; array-dimensions, length
for example, (aref foo 2 1) refers to element (2, 1) of the array.
Notes:
(aref (setq
alpha (make-array 4)) 3) ! implementation-dependent
(setf (aref
alpha 3) 'sirens) !
SIRENS (array-dimension array n) (nth n (array-dimensions array))
(aref alpha
3) !
SIRENS
(aref (setq
beta (make-array '(2 4)
array-dimensions
:element-type '(unsigned-byte 2)
1 2) 1!
:initial-contents '((0 1 2 3) (3 2 1 0))))
Function
(setq gamma '(0 2))
(apply #'aref beta gamma) !
2
Syntax:
(setf (apply #'aref beta gamma) 3) 3! array-dimensions array ! dimensions
(apply #'aref beta gamma) !
3
(aref beta 0 2) 3! Arguments and Values:
See Also: array |an array .
bit, char, elt, row-major-aref , svref , Section 3.2.1 (Compiler Terminology) dimensions |a list of integers .
Description:
array-dimension Function Returns a list of the dimensions of array . (If array is a vector with a ll pointer , that ll pointer
is ignored.)
Syntax: Examples:
array-dimension array axis-number ! dimension (array-dimensions (make-array 4)) !
(4)
Arguments and Values: (array-dimensions (make-array '(2 3))) !
(2 3)
If array-displacement is called on an array for which a non-nil object was provided as the (array-in-bounds-p a 0 0) ! true
:displaced-to argument to make-array or adjust-array , it must return that object as its rst (array-in-bounds-p a 6 10) ! true
value. It is implementation-dependent whether array-displacement returns a non-nil primary (array-in-bounds-p a 0 -1) ! false
value for any other array . (array-in-bounds-p a 0 11) ! false
! false
Examples: (array-in-bounds-p a 7 0)
!
See Also:
(setq a1 (make-array 5)) #<ARRAY 5 simple 46115576>
(setq a2 (make-array 4 :displaced-to a1
array-dimensions
!
:displaced-index-offset 1))
#<ARRAY 4 indirect 46117134>
Notes:
(array-displacement a2) (array-in-bounds-p array subscripts)
! #<ARRAY 5 simple 46115576>, 1 (and (not (some #'minusp (list subscripts)))
(setq a3 (make-array 2 :displaced-to a2 (every #'< (list subscripts) (array-dimensions array)))
:displaced-index-offset 2))
! #<ARRAY 2 indirect 46122527>
array-rank
(array-displacement a3)
! #<ARRAY 4 indirect 46117134>, 2
Function
Exceptional Situations:
Should signal an error of type type-error if array is not an array . Syntax:
See Also: array-rank array ! rank
make-array Arguments and Values:
array |an array .
array-in-bounds-p Function rank |a non-negative integer .
Description:
Syntax: Returns the number of dimensions of array .
array-in-bounds-p array &rest subscripts ! generalized-boolean
Examples:
Arguments and Values: !
array |an array . (array-rank
(array-rank
(make-array
(make-array
'()))
4)) ! 1
0
subscripts |a list of integers of length equal to the rank of the array . (array-rank (make-array '(4))) ! 1
(array-rank (make-array '(2 3)))! 2
generalized-boolean|a generalized boolean .
Exceptional Situations:
Description: Should signal an error of type type-error if its argument is not an array .
Returns true if the subscripts are all in bounds for array ; otherwise returns false . (If array is a
vector with a ll pointer , that ll pointer is ignored.) See Also:
array-rank-limit, make-array
Examples:
(setq a (make-array '(7 11) :element-type 'string-char))
Syntax: Syntax:
array-row-major-index array &rest subscripts ! index array-total-size array ! size
Arguments and Values: Arguments and Values:
array |an array . array |an array .
subscripts |a list of valid array indices for the array . size |a non-negative integer .
index |a valid array row-major index for the array . Description:
Description: Returns the array total size of the array .
Computes the position according to the row-major ordering of array for the element that is Examples:
specied by subscripts , and returns the oset of the element in the computed position from the
beginning of array . (array-total-size (make-array 4)) ! 4
(array-total-size (make-array 4 :fill-pointer 2)) !4
For a one-dimensional array , the result of array-row-major-index equals subscript . (array-total-size (make-array 0)) ! 0
Exceptional Situations:
(arrayp (make-array '(2 3 4) :adjustable t)) ! true Should signal an error of type type-error if vector is not a vector with a ll pointer .
(arrayp (make-array 6)) ! true
(arrayp #*1011)! true See Also:
(arrayp "hi")! true make-array , length
(arrayp 'hi)! false
(arrayp 12) ! false Notes:
See Also: There is no operator that will remove a vector 's ll pointer .
typep
Notes: row-major-aref Accessor
object ) object
Syntax:
(arrayp (typep 'array)
array-dimension-limit
:element-type (array-element-type array))
index)
Constant Variable
(aref array i1 i2 ...)
(row-major-aref array (array-row-major-index array i1 i2))
Constant Value:
A positive xnum , the exact magnitude of which is implementation-dependent , but which is not
less than 1024.
upgraded-array-element-type Function Description:
The upper exclusive bound on each individual dimension of an array .
Syntax: See Also:
upgraded-array-element-type typespec &optional environment ! upgraded-typespec make-array
Arguments and Values:
typespec |a type specier . array-rank-limit Constant Variable
environment |an environment object . The default is nil, denoting the null lexical environment
and the current global environment .
Constant Value:
upgraded-typespec |a type specier . A positive xnum , the exact magnitude of which is implementation-dependent , but which is not
less than 8.
Description:
Returns the element type of the most specialized array representation capable of holding items of Description:
the type denoted by typespec . The upper exclusive bound on the rank of an array .
The typespec is a subtype of (and possibly type equivalent to) the upgraded-typespec . See Also:
If typespec is bit, the result is type equivalent to bit. If typespec is base-char, the result is type make-array
equivalent to base-char. If typespec is character, the result is type equivalent to character.
The purpose of upgraded-array-element-type is to reveal how an implementation does its
upgrading .
The environment is used to expand any derived type speciers that are mentioned in the typespec .
See Also:
array-element-type, make-array
Syntax:
vector-push new-element vector ! new-index-p
vector-pop Function vector-push-extend new-element vector &optional extension ! new-index
Syntax: Arguments and Values:
new-element |an object .
vector-pop vector ! element
vector |a vector with a ll pointer .
Arguments and Values:
vector |a vector with a ll pointer . extension|a positive integer . The default is implementation-dependent .
element |an object . new-index-p |a valid array index for vector , or nil.
vector-push, vector-push-extend
new-index |a valid array index for vector . See Also:
adjustable-array-p, ll-pointer, vector-pop
Description:
vector-push and vector-push-extend store new-element in vector . vector-push attempts to store
new-element in the element of vector designated by the ll pointer , and to increase the ll pointer
by one. If the (>= (fill-pointer vector ) (array-dimension vector 0)), neither vector nor its ll vectorp Function
pointer are aected. Otherwise, the store and increment take place and vector-push returns the
former value of the ll pointer which is one less than the one it leaves in vector . Syntax:
vector-push-extend is just like vector-push except that if the ll pointer gets too large, vector vectorp object ! generalized-boolean
is extended using adjust-array so that it can contain more elements. Extension is the minimum
number of elements to be added to vector if it must be extended. Arguments and Values:
object |an object .
vector-push and vector-push-extend return the index of new-element in vector . If
(>= (fill-pointer vector ) (array-dimension vector 0)), vector-push returns nil. generalized-boolean|a generalized boolean .
Examples: Description:
Returns true if object is of type vector; otherwise, returns false .
(vector-push (setq fable (list 'fable))
(setq fa (make-array 8
:fill-pointer 2
Examples:
:initial-element 'first-one))) !2 (vectorp "aaaaaa") ! true
(fill-pointer fa) ! 3 (vectorp (make-array 6 :fill-pointer t)) ! true
(eq (aref fa 2) fable) ! true (vectorp (make-array '(2 3 4))) ! false
(vector-push-extend #\X (vectorp #*11) ! true
(setq aa (vectorp #b11) ! false
(make-array 5
:element-type 'character Notes:
:adjustable t
:fill-pointer 3))) 3 ! (vectorp object ) (typep object 'vector)
(fill-pointer aa) ! 4
(vector-push-extend #\Y aa 4) 4 !
!
bit, sbit
(array-total-size aa) at least 5
(vector-push-extend #\Z aa 4) 5 ! Accessor
(array-total-size aa) !
9 ;(or more)
Examples: Notes:
(bit-and (setq ba #*11101010) #*01101011) !
#*01101010 (bit-vector-p object ) (typep object 'bit-vector)
(bit-and #*1100 #*1010) !
#*1000
(bit-andc1 #*1100 #*1010) !#*0010
!
simple-bit-vector-p
(setq rba (bit-andc2 ba #*00110011 t)) #*11001000
(eq rba ba) ! true Function
(bit-not (setq ba #*11101010)) !
#*00010101
(setq rba (bit-not ba
(setq tba (make-array 8
:element-type 'bit))))
Syntax:
! #*00010101 simple-bit-vector-p object ! generalized-boolean
(equal rba tba) ! true Arguments and Values:
(bit-xor #*1100 #*1010) !
#*0110
object |an object .
See Also: generalized-boolean|a generalized boolean .
lognot, logand
Description:
bit-vector-p Function
Examples:
Returns true if object is of type simple-bit-vector; otherwise, returns false .