# HG changeset patch # User Richard M. Stallman # Date 997651086 0 # Node ID 72006230a5d861e2c4f230c67dc8bc131b823145 # Parent 0f05936702f1baeaee63a2df6a7ae39f0b4017a2 Add bool-vector example. diff -r 0f05936702f1 -r 72006230a5d8 lispref/sequences.texi --- 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. +