121 |
@itemize @bullet |
@itemize @bullet |
122 |
|
|
123 |
@item |
@item |
124 |
For some procedures, notably type predicates, we use @dfn{iff} to |
For some procedures, notably type predicates, we use @dfn{iff} to mean |
125 |
mean `if and only if'. The construct is usually something like: |
``if and only if''. The construct is usually something like: `Return |
126 |
`Return @var{val} iff @var{condition}', where @var{val} is usually |
@var{val} iff @var{condition}', where @var{val} is usually |
127 |
`@code{#t}' or `non-@code{#f}'. This typically means that @var{val} |
``@nicode{#t}'' or ``non-@nicode{#f}''. This typically means that |
128 |
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 |
129 |
otherwise. |
returned otherwise. To clarify: @var{val} will @strong{only} be |
130 |
|
returned when @var{condition} is true. |
131 |
@cindex iff |
@cindex iff |
132 |
|
|
133 |
@item |
@item |
135 |
evaluation of Scheme expression is shown, we use some notation for |
evaluation of Scheme expression is shown, we use some notation for |
136 |
denoting the output and evaluation results of expressions. |
denoting the output and evaluation results of expressions. |
137 |
|
|
138 |
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 |
139 |
an evaluation: |
an evaluation: |
140 |
|
|
141 |
@lisp |
@lisp |
142 |
(+ 1 2) |
(+ 1 2) |
143 |
@result{} |
@result{} 3 |
|
3 |
|
144 |
@end lisp |
@end lisp |
145 |
|
|
146 |
Some procedures produce some output besides returning a value. This |
Some procedures produce some output besides returning a value. This |
147 |
is denoted by the symbol @code{@print{}}. |
is denoted by the symbol @samp{@print{}}. |
148 |
|
|
149 |
@lisp |
@lisp |
150 |
(begin (display 1) (newline) 'hooray) |
(begin (display 1) (newline) 'hooray) |
151 |
@print{} 1 |
@print{} 1 |
152 |
@result{} |
@result{} hooray |
|
hooray |
|
153 |
@end lisp |
@end lisp |
154 |
|
|
155 |
|
As you can see, this code prints @samp{1} (denoted by |
156 |
|
@samp{@print{}}), and returns @code{hooray} (denoted by |
157 |
|
@samp{@result{}}). Do not confuse the two. |
158 |
|
|
159 |
@c Add other conventions here. |
@c Add other conventions here. |
160 |
|
|
161 |
@end itemize |
@end itemize |