From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16293: 24.3.50; doc of `string-to-number' Date: Sun, 29 Dec 2013 16:03:29 -0800 (PST) Message-ID: References: <545fea48-4716-4435-b0b1-0ac2efecd8d0@default> <87wqin9svr.fsf@gmail.com> <6ef6dd56-a813-4192-9508-04f35ce71dab@default> <87sitb9q6n.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1388361858 25757 80.91.229.3 (30 Dec 2013 00:04:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Dec 2013 00:04:18 +0000 (UTC) Cc: 16293@debbugs.gnu.org To: jay.p.belanger@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 30 01:04:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VxQLH-0002Zv-4d for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 01:04:23 +0100 Original-Received: from localhost ([::1]:56596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxQLG-0004rc-Ge for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Dec 2013 19:04:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxQL4-0004j8-Ub for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 19:04:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxQKw-0007zz-A7 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 19:04:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxQKw-0007zv-7H for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 19:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VxQKv-0005Iz-RR for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 19:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Dec 2013 00:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16293 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16293-submit@debbugs.gnu.org id=B16293.138836182320363 (code B ref 16293); Mon, 30 Dec 2013 00:04:01 +0000 Original-Received: (at 16293) by debbugs.gnu.org; 30 Dec 2013 00:03:43 +0000 Original-Received: from localhost ([127.0.0.1]:50986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VxQKc-0005IK-Ah for submit@debbugs.gnu.org; Sun, 29 Dec 2013 19:03:42 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:29867) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VxQKY-0005I8-SH for 16293@debbugs.gnu.org; Sun, 29 Dec 2013 19:03:39 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rBU03b5C027264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Dec 2013 00:03:38 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBU03YcU024463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Dec 2013 00:03:35 GMT Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBU03Yks014055; Mon, 30 Dec 2013 00:03:34 GMT In-Reply-To: <87sitb9q6n.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82725 Archived-At: > >> > Say what happens if STRING cannot successfully be parsed as a number= : > >> > the function raises an error. > >> > >> When would it give an error, rather than 0? > > > > If it never raises an error, then say explicitly that for any > > string that cannot successfully be parsed as a number it returns 0. >=20 > It does say: > If the first character after the ignored whitespace is neither a > digit in the given base, nor a plus or minus sign, nor the leading > dot of a floating point number, this function returns 0. > > Should this be reworded, or perhaps moved to earlier in the > documentation? It should be corrected to be more complete. It's not just about the first character. Any string of characters that cannot be successfully parsed as a number results in a return value of zero (apparently - I have not checked the code). "+@", for instance. =20