emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistency in `string-to-number'


From: Juanma Barranquero
Subject: Re: Inconsistency in `string-to-number'
Date: Fri, 24 Apr 2009 13:45:50 +0200

> Looks like a bug to me.  Either (string-to-number "1:") should return
> zero, as if the string was not a number at all

That, and clarifying the docstring, would be the most sensible
solution. Currently, "It ignores leading spaces and tabs." seems to
imply that nothing more is ignored. Also, "If the base used is not 10,
floating point is not recognized." is unclear about what the expected
result would be.

Obviously, any such change should be done post 23.1; there's almost
1,000 uses of `string-to-number' in lisp/*.el. It's hard to know how
many of them assume that "1:" will be interpreted as "1".

    Juanma




reply via email to

[Prev in Thread] Current Thread [Next in Thread]