changeset 38789:72006230a5d8

Add bool-vector example.
author Richard M. Stallman <rms@gnu.org>
date Sun, 12 Aug 2001 21:18:06 +0000
parents 0f05936702f1
children dc7cb360c349
files lispref/sequences.texi
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/sequences.texi	Sun Aug 12 21:16:54 2001 +0000
+++ b/lispref/sequences.texi	Sun Aug 12 21:18:06 2001 +0000
@@ -703,3 +703,22 @@
 and @code{nil} otherwise.
 @end defun
 
+  Here is an example of creating, examining, and updating a
+bool-vector.  Note that the printed form represents up to 8 boolean
+values as a single character.
+
+@example
+(setq bv (make-bool-vector 5 t))
+     @result{} #&5"^_"
+(aref bv 1)
+     @result{} t
+(aset bv 3 nil)
+     @result{} nil
+bv
+     @result{} #&5"^W"
+@end example
+
+@noindent
+These results make sense because the binary codes for control-_ and
+control-W are 11111 and 10111, respectively.
+