* string-to-number full behavior not mentioned in the docstring
@ 2006-07-13 6:42 Mathias Dahl
2006-07-14 4:06 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Mathias Dahl @ 2006-07-13 6:42 UTC (permalink / raw)
I just tested `string-to-number':
(string-to-number "1234")
=> 1234
(string-to-number "12XYZ34")
=> 12
(string-to-number "1234XYZ")
=> 1234
The docstring says:
--
(string-to-number string &optional base)
Parse string as a decimal number and return the number.
This parses both integers and floating point numbers.
It ignores leading spaces and tabs.
If base, interpret string as a number in that base. If base isn't
present, base 10 is used. base must be between 2 and 16 (inclusive).
If the base used is not 10, floating point is not recognized.
--
The behavior above is not explained. I checked the Elisp manual and it
*is* mentioned there. Shouldn't the behavior be mentioned in the
docstring too? The text from the manual isn't that long.
I know I know, we cannot document everything in the docstrings, but in
this case I think it is short enough to include.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: string-to-number full behavior not mentioned in the docstring
2006-07-13 6:42 string-to-number full behavior not mentioned in the docstring Mathias Dahl
@ 2006-07-14 4:06 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2006-07-14 4:06 UTC (permalink / raw)
Cc: emacs-devel
The behavior above is not explained. I checked the Elisp manual and it
*is* mentioned there. Shouldn't the behavior be mentioned in the
docstring too? The text from the manual isn't that long.
I know I know, we cannot document everything in the docstrings, but in
this case I think it is short enough to include.
Please add it if you like.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-14 4:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-13 6:42 string-to-number full behavior not mentioned in the docstring Mathias Dahl
2006-07-14 4:06 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.