mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
Merge branch 'stable-2.0'
Conflicts: module/system/vm/traps.scm test-suite/tests/peval.test
This commit is contained in:
commit
1df515a077
19 changed files with 276 additions and 80 deletions
|
@ -1,7 +1,7 @@
|
|||
@c -*-texinfo-*-
|
||||
@c This is part of the GNU Guile Reference Manual.
|
||||
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007,
|
||||
@c 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
|
||||
@c 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
|
||||
@c See the file guile.texi for copying conditions.
|
||||
|
||||
@node Simple Data Types
|
||||
|
@ -318,7 +318,8 @@ Scheme integers can be exact and inexact. For example, a number
|
|||
written as @code{3.0} with an explicit decimal-point is inexact, but
|
||||
it is also an integer. The functions @code{integer?} and
|
||||
@code{scm_is_integer} report true for such a number, but the functions
|
||||
@code{scm_is_signed_integer} and @code{scm_is_unsigned_integer} only
|
||||
@code{exact-integer?}, @code{scm_is_exact_integer},
|
||||
@code{scm_is_signed_integer}, and @code{scm_is_unsigned_integer} only
|
||||
allow exact integers and thus report false. Likewise, the conversion
|
||||
functions like @code{scm_to_signed_integer} only accept exact
|
||||
integers.
|
||||
|
@ -333,7 +334,7 @@ will become exact fractions.)
|
|||
@deffn {Scheme Procedure} integer? x
|
||||
@deffnx {C Function} scm_integer_p (x)
|
||||
Return @code{#t} if @var{x} is an exact or inexact integer number, else
|
||||
@code{#f}.
|
||||
return @code{#f}.
|
||||
|
||||
@lisp
|
||||
(integer? 487)
|
||||
|
@ -346,7 +347,7 @@ Return @code{#t} if @var{x} is an exact or inexact integer number, else
|
|||
@result{} #f
|
||||
|
||||
(integer? +inf.0)
|
||||
@result{} #t
|
||||
@result{} #f
|
||||
@end lisp
|
||||
@end deffn
|
||||
|
||||
|
@ -354,6 +355,24 @@ Return @code{#t} if @var{x} is an exact or inexact integer number, else
|
|||
This is equivalent to @code{scm_is_true (scm_integer_p (x))}.
|
||||
@end deftypefn
|
||||
|
||||
@deffn {Scheme Procedure} exact-integer? x
|
||||
@deffnx {C Function} scm_exact_integer_p (x)
|
||||
Return @code{#t} if @var{x} is an exact integer number, else
|
||||
return @code{#f}.
|
||||
|
||||
@lisp
|
||||
(exact-integer? 37)
|
||||
@result{} #t
|
||||
|
||||
(exact-integer? 3.0)
|
||||
@result{} #f
|
||||
@end lisp
|
||||
@end deffn
|
||||
|
||||
@deftypefn {C Function} int scm_is_exact_integer (SCM x)
|
||||
This is equivalent to @code{scm_is_true (scm_exact_integer_p (x))}.
|
||||
@end deftypefn
|
||||
|
||||
@defvr {C Type} scm_t_int8
|
||||
@defvrx {C Type} scm_t_uint8
|
||||
@defvrx {C Type} scm_t_int16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue