Make snarfing tools more robust to varied C preprocessor behavior.
[bpt/guile.git] / doc / ref / api-data.texi
index 05469f7..9fd353d 100644 (file)
@@ -56,6 +56,7 @@ For the documentation of such @dfn{compound} data types, see
 @tpindex Booleans
 
 The two boolean values are @code{#t} for true and @code{#f} for false.
+They can also be written as @code{#true} and @code{#false}, as per R7RS.
 
 Boolean values are returned by predicate procedures, such as the general
 equality predicates @code{eq?}, @code{eqv?} and @code{equal?}
@@ -318,7 +319,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 +335,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)
@@ -354,6 +356,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
@@ -2046,6 +2066,9 @@ name for each character.
 The short name for the ``delete'' character (code point U+007F) is
 @code{#\del}.
 
+The R7RS name for the ``escape'' character (code point U+001B) is
+@code{#\escape}.
+
 There are also a few alternative names left over for compatibility with
 previous versions of Guile.
 
@@ -2918,9 +2941,10 @@ The read syntax for strings is an arbitrarily long sequence of
 characters enclosed in double quotes (@nicode{"}).
 
 Backslash is an escape character and can be used to insert the following
-special characters.  @nicode{\"} and @nicode{\\} are R5RS standard, the
-next seven are R6RS standard --- notice they follow C syntax --- and the
-remaining four are Guile extensions.
+special characters.  @nicode{\"} and @nicode{\\} are R5RS standard,
+@nicode{\|} is R7RS standard, the next seven are R6RS standard ---
+notice they follow C syntax --- and the remaining four are Guile
+extensions.
 
 @table @asis
 @item @nicode{\\}
@@ -2930,6 +2954,9 @@ Backslash character.
 Double quote character (an unescaped @nicode{"} is otherwise the end
 of the string).
 
+@item @nicode{\|}
+Vertical bar character.
+
 @item @nicode{\a}
 Bell character (ASCII 7).
 
@@ -5548,6 +5575,16 @@ Although Guile provides this extended read syntax for symbols,
 widespread usage of it is discouraged because it is not portable and not
 very readable.
 
+Alternatively, if you enable the @code{r7rs-symbols} read option (see
+@pxref{Scheme Read}), you can write arbitrary symbols using the same
+notation used for strings, except delimited by vertical bars instead of
+double quotes.
+
+@example
+|foo bar|
+|\x3BB; is a greek lambda|
+|\| is a vertical bar|
+@end example
 
 @node Symbol Uninterned
 @subsubsection Uninterned Symbols