summaryrefslogtreecommitdiff
path: root/doc/ref/api-control.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ref/api-control.texi')
-rw-r--r--doc/ref/api-control.texi42
1 files changed, 23 insertions, 19 deletions
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index 7935d5633..fc5935070 100644
--- a/doc/ref/api-control.texi
+++ b/doc/ref/api-control.texi
@@ -44,7 +44,7 @@ If the test is true, we want to display ``greater'' to the current
output port, then display a newline. We use @code{begin} to form a
compound expression out of this sequence of sub-expressions.
-@deffn syntax begin expr1 expr2 @dots{}
+@deffn syntax begin expr @dots{}
The expression(s) are evaluated in left-to-right order and the value of
the last expression is returned as the value of the
@code{begin}-expression. This expression type is used when the
@@ -277,7 +277,7 @@ Scheme programs is normally expressed using recursion. Nevertheless,
R5RS defines a construct for programming loops, calling @code{do}. In
addition, Guile has an explicit looping syntax called @code{while}.
-@deffn syntax do ((variable init [step]) @dots{}) (test [expr @dots{}]) body @dots{}
+@deffn syntax do ((variable init [step]) @dots{}) (test expr @dots{}) body @dots{}
Bind @var{variable}s and evaluate @var{body} until @var{test} is true.
The return value is the last @var{expr} after @var{test}, if given. A
simple example will illustrate the basic form,
@@ -348,7 +348,7 @@ Run a loop executing the @var{body} forms while @var{cond} is true.
Within @code{while}, two extra bindings are provided, they can be used
from both @var{cond} and @var{body}.
-@deffn {Scheme Procedure} break break-arg...
+@deffn {Scheme Procedure} break break-arg @dots{}
Break out of the @code{while} form.
@end deffn
@@ -487,7 +487,7 @@ tag allows some useful prompt and abort idioms, discussed in the next
section.
@end deffn
-@deffn {Scheme Procedure} abort-to-prompt tag val ...
+@deffn {Scheme Procedure} abort-to-prompt tag val1 val2 @dots{}
Unwind the dynamic and control context to the nearest prompt named @var{tag},
also passing the given values.
@end deffn
@@ -599,8 +599,9 @@ The @code{%} symbol is chosen because it looks like a prompt.
Likewise there is an abbreviation for @code{abort-to-prompt}, which
assumes the default prompt tag:
-@deffn {Scheme Procedure} abort val...
-Abort to the default prompt tag, passing @var{val...} to the handler.
+@deffn {Scheme Procedure} abort val1 val2 @dots{}
+Abort to the default prompt tag, passing @var{val1} @var{val2} @dots{}
+to the handler.
@end deffn
As mentioned before, @code{(ice-9 control)} also provides other
@@ -627,19 +628,22 @@ If both continuation and handler implicitly add prompts, then the
operator is @dfn{+F+}. @code{shift} and @code{reset} are such
operators.
-@deffn {Scheme Syntax} reset body...
-Establish a prompt, and evaluate @var{body...} within that prompt.
+@deffn {Scheme Syntax} reset body1 body2 @dots{}
+Establish a prompt, and evaluate @var{body1} @var{body2} @dots{} within
+that prompt.
The prompt handler is designed to work with @code{shift}, described
below.
@end deffn
-@deffn {Scheme Syntax} shift cont body...
-Abort to the nearest @code{reset}, and evaluate @var{body...} in a
-context in which the captured continuation is bound to @var{cont}.
+@deffn {Scheme Syntax} shift cont body1 body2 @dots{}
+Abort to the nearest @code{reset}, and evaluate @var{body1} @var{body2}
+@dots{} in a context in which the captured continuation is bound to
+@var{cont}.
-As mentioned above, both the @var{body...} expression and invocations of
-@var{cont} implicitly establish a prompt.
+As mentioned above, taken together, the @var{body1} @var{body2} @dots{}
+expressions and the invocations of @var{cont} implicitly establish a
+prompt.
@end deffn
Interested readers are invited to explore Oleg Kiselyov's wonderful web
@@ -803,7 +807,7 @@ multiple values with a procedure which accepts these values as
parameters.
@rnindex values
-@deffn {Scheme Procedure} values arg1 @dots{} argN
+@deffn {Scheme Procedure} values arg @dots{}
@deffnx {C Function} scm_values (args)
Delivers all of its arguments to its continuation. Except for
continuations created by the @code{call-with-values} procedure,
@@ -1220,10 +1224,10 @@ depends on the exception type. The documentation for each possible type
of exception should specify the additional arguments that are expected
for that kind of exception.
-@deffn {Scheme Procedure} throw key . args
+@deffn {Scheme Procedure} throw key arg @dots{}
@deffnx {C Function} scm_throw (key, args)
-Invoke the catch form matching @var{key}, passing @var{args} to the
-@var{handler}.
+Invoke the catch form matching @var{key}, passing @var{arg} @dots{} to
+the @var{handler}.
@var{key} is a symbol. It will match catches of the same symbol or of
@code{#t}.
@@ -1312,9 +1316,9 @@ Guile provides a set of convenience procedures for signaling error
conditions that are implemented on top of the exception primitives just
described.
-@deffn {Scheme Procedure} error msg args @dots{}
+@deffn {Scheme Procedure} error msg arg @dots{}
Raise an error with key @code{misc-error} and a message constructed by
-displaying @var{msg} and writing @var{args}.
+displaying @var{msg} and writing @var{arg} @enddots{}.
@end deffn
@deffn {Scheme Procedure} scm-error key subr message args data