aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-08-12 21:18:06 +0000
committerRichard M. Stallman2001-08-12 21:18:06 +0000
commit5785f550ab79aa26746a8cce2f23fc6c6d611d97 (patch)
treea48dc0ff4487970587ec853f5c115e0fe3f8a5fe
parent3ae8380be4a0c04321e6b9fdc656c1e41bdcffc3 (diff)
downloademacs-5785f550ab79aa26746a8cce2f23fc6c6d611d97.tar.gz
emacs-5785f550ab79aa26746a8cce2f23fc6c6d611d97.zip
Add bool-vector example.
-rw-r--r--lispref/sequences.texi19
1 files changed, 19 insertions, 0 deletions
diff --git a/lispref/sequences.texi b/lispref/sequences.texi
index 4228a79c576..f6869f1da8c 100644
--- a/lispref/sequences.texi
+++ b/lispref/sequences.texi
@@ -703,3 +703,22 @@ This returns @code{t} if @var{object} is a bool-vector,
703and @code{nil} otherwise. 703and @code{nil} otherwise.
704@end defun 704@end defun
705 705
706 Here is an example of creating, examining, and updating a
707bool-vector. Note that the printed form represents up to 8 boolean
708values as a single character.
709
710@example
711(setq bv (make-bool-vector 5 t))
712 @result{} #&5"^_"
713(aref bv 1)
714 @result{} t
715(aset bv 3 nil)
716 @result{} nil
717bv
718 @result{} #&5"^W"
719@end example
720
721@noindent
722These results make sense because the binary codes for control-_ and
723control-W are 11111 and 10111, respectively.
724