mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
(Manual Conventions): Double-quote some statements formerly
single-quoted. Remove some redundant quotes around code. Clarify meaning of `iff' further for those that didn't get it the first time 'round (like me). Make graphical indicators samples, not code. Put results of evaluation on the same line as @result symbols. Use @print example as example of total usage, and remind readers not to forget the difference.
This commit is contained in:
parent
bdf26b606b
commit
cef6deaff1
1 changed files with 15 additions and 12 deletions
|
@ -121,12 +121,13 @@ We use some conventions in this manual.
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
|
||||||
@item
|
@item
|
||||||
For some procedures, notably type predicates, we use @dfn{iff} to
|
For some procedures, notably type predicates, we use @dfn{iff} to mean
|
||||||
mean `if and only if'. The construct is usually something like:
|
``if and only if''. The construct is usually something like: `Return
|
||||||
`Return @var{val} iff @var{condition}', where @var{val} is usually
|
@var{val} iff @var{condition}', where @var{val} is usually
|
||||||
`@code{#t}' or `non-@code{#f}'. This typically means that @var{val}
|
``@nicode{#t}'' or ``non-@nicode{#f}''. This typically means that
|
||||||
is returned if @var{condition} holds, and that @samp{#f} is returned
|
@var{val} is returned if @var{condition} holds, and that @samp{#f} is
|
||||||
otherwise.
|
returned otherwise. To clarify: @var{val} will @strong{only} be
|
||||||
|
returned when @var{condition} is true.
|
||||||
@cindex iff
|
@cindex iff
|
||||||
|
|
||||||
@item
|
@item
|
||||||
|
@ -134,25 +135,27 @@ In examples and procedure descriptions and all other places where the
|
||||||
evaluation of Scheme expression is shown, we use some notation for
|
evaluation of Scheme expression is shown, we use some notation for
|
||||||
denoting the output and evaluation results of expressions.
|
denoting the output and evaluation results of expressions.
|
||||||
|
|
||||||
The symbol @code{@result{}} is used to tell which value is returned by
|
The symbol @samp{@result{}} is used to tell which value is returned by
|
||||||
an evaluation:
|
an evaluation:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(+ 1 2)
|
(+ 1 2)
|
||||||
@result{}
|
@result{} 3
|
||||||
3
|
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
Some procedures produce some output besides returning a value. This
|
Some procedures produce some output besides returning a value. This
|
||||||
is denoted by the symbol @code{@print{}}.
|
is denoted by the symbol @samp{@print{}}.
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(begin (display 1) (newline) 'hooray)
|
(begin (display 1) (newline) 'hooray)
|
||||||
@print{} 1
|
@print{} 1
|
||||||
@result{}
|
@result{} hooray
|
||||||
hooray
|
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
As you can see, this code prints @samp{1} (denoted by
|
||||||
|
@samp{@print{}}), and returns @code{hooray} (denoted by
|
||||||
|
@samp{@result{}}). Do not confuse the two.
|
||||||
|
|
||||||
@c Add other conventions here.
|
@c Add other conventions here.
|
||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue