diff man/lispref/sequences.texi @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 05472e90ae02
children c7528f8e288d
line wrap: on
line diff
--- a/man/lispref/sequences.texi	Mon Aug 13 09:00:04 2007 +0200
+++ b/man/lispref/sequences.texi	Mon Aug 13 09:02:59 2007 +0200
@@ -302,20 +302,18 @@
 @node Array Functions
 @section Functions that Operate on Arrays
 
-  In this section, we describe the functions that accept strings, vectors,
-and bit vectors.
+  In this section, we describe the functions that accept both strings
+and vectors.
 
 @defun arrayp object
-This function returns @code{t} if @var{object} is an array (i.e., a
-string, vector, or bit vector).
+This function returns @code{t} if @var{object} is an array (i.e., either a
+vector or a string).
 
 @example
 @group
-(arrayp "asdf")
-@result{} t
 (arrayp [a])
 @result{} t
-(arrayp #*101)
+(arrayp "asdf")
 @result{} t
 @end group
 @end example
@@ -338,12 +336,7 @@
 
 @group
 (aref "abcdefg" 1)
-     @result{} ?b
-@end group
-
-@group
-(aref #*1101 2)
-     @result{} 0
+     @result{} 98           ; @r{@samp{b} is @sc{ASCII} code 98.}
 @end group
 @end example
 
@@ -368,19 +361,10 @@
 (setq x "asdfasfd")
      @result{} "asdfasfd"
 (aset x 3 ?Z)
-     @result{} ?Z
+     @result{} 90
 x
      @result{} "asdZasfd"
 @end group
-
-@group
-(setq bv #*1111)
-     @result{} #*1111
-(aset bv 2 0)
-     @result{} 0
-bv
-     @result{} #*1101
-@end group
 @end example
 
 If @var{array} is a string and @var{object} is not a character, a
@@ -400,20 +384,12 @@
 a
      @result{} [0 0 0 0 0 0 0]
 @end group
-
 @group
 (setq s "When in the course")
      @result{} "When in the course"
 (fillarray s ?-)
      @result{} "------------------"
 @end group
-
-@group
-(setq bv #*1101)
-     @result{} #*1101
-(fillarray bv 0)
-     @result{} #*0000
-@end group
 @end example
 
 If @var{array} is a string and @var{object} is not a character, a
@@ -569,8 +545,9 @@
 create a bit vector with 100,000 elements if you really wanted to.
 
   Bit vectors have a special printed representation consisting of
-@samp{#*} followed by the bits of the vector.  For example, a bit vector
-whose elements are 0, 1, 1, 0, and 1, respectively, is printed as
+@samp{#*} followed by the bits of the vector.  For example, a bit
+vector whose elements are 0, 1, 1, 0, and 1, respectively, is printed
+as
 
 @example
 #*01101
@@ -593,7 +570,7 @@
      @result{} t
 (bit-vector-p [0 1])
      @result{} nil
-(bit-vector-p "01")
+(vectorp "asdf")
      @result{} nil
 @end group
 @end example
@@ -604,27 +581,27 @@
 @end defun
 
 @defun bit-vector &rest objects
-This function creates and returns a bit vector whose elements are the
-arguments @var{objects}.  The elements must be either of the two
+This function creates and returns a vector whose elements are the
+arguments, @var{objects}.  The elements must be either of the two
 integers 0 or 1.
 
 @example
 @group
 (bit-vector 0 0 0 1 0 0 0 0 1 0)
      @result{} #*0001000010
-(bit-vector)
+(vector)
      @result{} #*
 @end group
 @end example
 @end defun
 
 @defun make-bit-vector length object
-This function creates and returns a bit vector consisting of
-@var{length} elements, each initialized to @var{object}.
+This function returns a new bit vector consisting of @var{length} elements,
+each initialized to @var{object}.
 
 @example
 @group
-(setq picket-fence (make-bit-vector 9 1))
+(setq sleepy (make-vector 9 1))
      @result{} #*111111111
 @end group
 @end example
@@ -632,13 +609,13 @@
 
 @defun bvconcat &rest sequences
 @cindex copying bit vectors
-This function returns a new bit vector containing all the elements of
-the @var{sequences}.  The arguments @var{sequences} may be lists,
-vectors, or bit vectors, all of whose elements are the integers 0 or 1.
-If no @var{sequences} are given, an empty bit vector is returned.
+This function returns a new bit vector containing all the elements of the
+@var{sequences}.  The arguments @var{sequences} may be lists or vectors,
+all of whose elements are the integers 0 or 1.  If no @var{sequences} are
+given, an empty bit vector is returned.
 
 The value is a newly constructed bit vector that is not @code{eq} to any
-existing bit vector.
+existing vector.
 
 @example
 @group
@@ -665,9 +642,9 @@
 
 @example
 @group
-(setq bv #*00001110)
+(setq avector #*00001110)
      @result{} #*00001110
-(append bv nil)
+(append avector nil)
      @result{} (0 0 0 0 1 1 1 0)
 @end group
 @end example