From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.bugs Subject: Re: garbled documentation Date: Fri, 09 Jan 2004 08:06:28 +1000 Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: <87ekuaf63f.fsf@zip.com.au> References: <200312311825.hBVIPB42016073@pc18.math.umbc.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073599953 28489 80.91.224.253 (8 Jan 2004 22:12:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 22:12:33 +0000 (UTC) Cc: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jan 08 23:12:13 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeiNx-0003mm-00 for ; Thu, 08 Jan 2004 23:12:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AejH5-00070H-1J for guile-bugs@m.gmane.org; Thu, 08 Jan 2004 18:09:11 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AejGo-0006zS-3J for bug-guile@gnu.org; Thu, 08 Jan 2004 18:08:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AejGA-0006uf-IZ for bug-guile@gnu.org; Thu, 08 Jan 2004 18:08:45 -0500 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AejG9-0006uK-Ky for bug-guile@gnu.org; Thu, 08 Jan 2004 18:08:13 -0500 Original-Received: from mongrel.pacific.net.au (mongrel.pacific.net.au [61.8.0.107]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i08M6f92006256; Fri, 9 Jan 2004 09:06:41 +1100 Original-Received: from localhost (ppp148.dyn10.pacific.net.au [61.8.10.148]) by mongrel.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i08M6eha004714; Fri, 9 Jan 2004 09:06:40 +1100 Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 1AeiIO-0001Jn-00; Fri, 09 Jan 2004 08:06:28 +1000 Original-To: "Rouben Rostamian" User-Agent: Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3 (gnu/linux) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:1082 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:1082 "Rouben Rostamian" writes: > > - Scheme Procedure: bit-set*! v kv obj > - C Function: scm_bit_set_star_x (v, kv, obj) > > This description is garbled. The procedure arguments are listed > as "v kv obj" while the description refers to "uve, BV, BOOL", etc. Yep. It's not really as clear as it could be either. > In fact, most descriptions under the section "Bit Vectors" suffer from > the same problem. I made a bit of a revision: Bit Vectors ----------- Bit vectors are a specific type of uniform array: an array of booleans with a single zero-based index. They are displayed as a sequence of `0's and `1's prefixed by `#*', e.g., (make-uniform-vector 8 #t #f) => #*00000000 - Scheme Procedure: bit-count bool bitvector - C Function: scm_bit_count (bool, bitvector) Return a count of entries in BITVECTOR equal to BOOL. For example, (bit-count #f #*000111000) => 6 - Scheme Procedure: bit-position bool bitvector start - C Function: scm_bit_position (bool, bitvector, start) Return the index of the first occurrance of BOOL in BITVECTOR, starting from START. If there is no BOOL entry between START and the end of BITVECTOR, then return `#f'. For example, (bit-position #t #*000101 0) => 3 (bit-position #f #*0001111 3) => #f - Scheme Procedure: bit-invert! bitvector - C Function: scm_bit_invert_x (bitvector) Modify BITVECTOR by replacing each element with its negation. - Scheme Procedure: bit-set*! bitvector uvec bool - C Function: scm_bit_set_star_x (bitvector, uvec, bool) Set entries of BITVECTOR to BOOL, with UVEC selecting the entries to change. If UVEC is a bit vector, then those entries where it has `#t' are the ones in BITVECTOR which are set to BOOL. When BOOL is `#t' it's like UVEC is OR'ed into BITVECTOR. Or when BOOL is `#f' it can be seen as an ANDNOT. (define bv #*01000010) (bit-set*! bv #*10010001 #t) bv => #*11010011 If UVEC is a uniform vector of unsigned long integers, then they're indexes into BITVECTOR which are set to BOOL. (define bv #*01000010) (bit-set*! bv #u(5 2 7) #t) bv => #*01100111 - Scheme Procedure: bit-count* bitvector uvec bool - C Function: scm_bit_count_star (bitvector, uvec, bool) Return a count of entries in BITVECTOR which are equal to BOOL, with UVEC selecting the entries to consider. UVEC is interpreted in the same way as `bit-set*!' above. Namely, if UVEC is a bit vector then entries which have `#t' there are considered in BITVECTOR. Or if UVEC is a uniform vector of unsigned long integers then it's the indexes in BITVECTOR to consider. For example, (bit-count* #*01110111 #*11001101 #t) => 3 (bit-count* #*01110111 #u(7 0 4) #f) => 2 _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile