[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

arrays



    Date: Wed, 20 May 87 16:22:48 PDT
    From: Richard Berman <berman@vaxa.isi.edu>

    On bit vectors:

    on page 12:

    "One dimensional arrays of bits (that is, of integers whose values are 0 or 1)
    are called bit vectors"

    implies that any array of all 0 and 1 integers is a bit vector.

    Page 29:

    "All implementations are also required to provide specialized arrays of bits,
    that is, arrays of type (array bit); the one-dimensional instances of this
    specialization are called bit-vectors."

    Page 286:

    "Vectors whose elements are restricted to type bit are called bit-vectors"

    This implies strongly that a bit vector won't let one store any other value
    than 0 or 1.

I think the imprecise language on page 12 should not be assumed to overrule
the more precise language on pages 29 and 286.  So bit-vector and bit-array
refer to the specialized types.  Another way of saying this is that you cannot
change whether an object is a bit-vector (or a bit-array) by using setf of aref,
or indeed by using any other Common Lisp feature (read the description of the
:element-type argument to adjust-array carefully).

    It is my *opinion* that #(1 0 0 1) is not a bit vector because there is a
    precise input style for such (like *1001) and bit vectors are specialized.

I'm sure you're right.