From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Exposing `scm_i_mem2number ()' Date: Thu, 16 Mar 2006 11:07:52 +0100 Organization: LAAS-CNRS Message-ID: <87hd5yzoqv.fsf@laas.fr> References: <87d5holin9.fsf@laas.fr> <874q30z3nr.fsf@zagadka.de> <87zmkrfmtz.fsf@laas.fr> <87u0a9xou6.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1142503726 9115 80.91.229.2 (16 Mar 2006 10:08:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Mar 2006 10:08:46 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 16 11:08:45 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FJpPN-0003k0-JH for guile-devel@m.gmane.org; Thu, 16 Mar 2006 11:08:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJpPM-0007f9-DB for guile-devel@m.gmane.org; Thu, 16 Mar 2006 05:08:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FJpPG-0007c2-1l for guile-devel@gnu.org; Thu, 16 Mar 2006 05:08:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FJpP6-0007XA-03 for guile-devel@gnu.org; Thu, 16 Mar 2006 05:08:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJpP5-0007Wp-Nv for guile-devel@gnu.org; Thu, 16 Mar 2006 05:08:23 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FJpTh-0001ro-WB for guile-devel@gnu.org; Thu, 16 Mar 2006 05:13:10 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id k2GA8CZC006588; Thu, 16 Mar 2006 11:08:14 +0100 (CET) Original-To: Marius Vollmer X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 26 =?iso-8859-1?Q?Vent=F4se?= an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Marius Vollmer , guile-devel@gnu.org In-Reply-To: <87u0a9xou6.fsf@laas.fr> (Ludovic =?iso-8859-1?Q?Court=E8s's?= message of "Wed, 08 Mar 2006 10:33:53 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-MIME-Autoconverted: from 8bit to quoted-printable by laas.laas.fr id k2GA8CZC006588 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5790 Archived-At: Hi, About `scm_c_locale_string_to_number ()'... ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > While writing it, it occurred to me that R5RS does not make it clear > whether `string->number' converts from a number's external > representation or not. As discussed in [0], while R5RS does not explicitly state that `string->number' converts from a number's external representation, it makes a connection with `number->string' which in turn explicitly converts to a number's external representation: - procedure: number->string z - procedure: number->string z radix RADIX must be an exact integer, either 2, 8, 10, or 16. If omitted, RADIX defaults to 10. The procedure `number->string' takes a number and a radix and returns as a string an external representation of the given number in the given radix such that (let ((number NUMBER) (radix RADIX)) (eqv? number (string->number (number->string number radix) radix))) is true. It is an error if no possible result makes this expression true. So the additional bit of documentation I suggested in my previous post (stating that `locale' in `scm_c_locale_string_to_number ()' has nothing to do with the number representation) is acceptable. Can someone comment on it or commit it? Thanks, Ludovic. [0] http://groups.google.com/group/comp.lang.scheme/tree/browse_frm/threa= d/dc6a98bbc7cda398/7490c0724e5eb305?rnum=3D1&hl=3Deo&q=3Dstring-%3Enumber= +group%3Acomp.lang.scheme&_done=3D%2Fgroup%2Fcomp.lang.scheme%2Fbrowse_fr= m%2Fthread%2Fdc6a98bbc7cda398%2F5de6eb2de0105bdb%3Flnk%3Dst%26q%3Dstring-= %3Enumber+group%3Acomp.lang.scheme%26rnum%3D1%26hl%3Deo%26#doc_13b48a9567= f63165 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel