comparison lispref/strings.texi @ 39196:4e9db7a710f8

(String Conversion) <string-to-number>: Document that a float is returned for integers that are too large.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 08 Sep 2001 17:41:41 +0000
parents dc7cb360c349
children 23a1cea22d13
comparison
equal deleted inserted replaced
39195:004939041c32 39196:4e9db7a710f8
534 This function returns the numeric value of the characters in 534 This function returns the numeric value of the characters in
535 @var{string}. If @var{base} is non-@code{nil}, integers are converted 535 @var{string}. If @var{base} is non-@code{nil}, integers are converted
536 in that base. If @var{base} is @code{nil}, then base ten is used. 536 in that base. If @var{base} is @code{nil}, then base ten is used.
537 Floating point conversion always uses base ten; we have not implemented 537 Floating point conversion always uses base ten; we have not implemented
538 other radices for floating point numbers, because that would be much 538 other radices for floating point numbers, because that would be much
539 more work and does not seem useful. 539 more work and does not seem useful. If @var{string} looks like an
540 integer but its value is too large to fit into a Lisp integer,
541 @code{string-to-number} returns a floating point result.
540 542
541 The parsing skips spaces and tabs at the beginning of @var{string}, then 543 The parsing skips spaces and tabs at the beginning of @var{string}, then
542 reads as much of @var{string} as it can interpret as a number. (On some 544 reads as much of @var{string} as it can interpret as a number. (On some
543 systems it ignores other whitespace at the beginning, not just spaces 545 systems it ignores other whitespace at the beginning, not just spaces
544 and tabs.) If the first character after the ignored whitespace is 546 and tabs.) If the first character after the ignored whitespace is