summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2005-07-27 12:26:21 +0000
committermichelou <michelou@epfl.ch>2005-07-27 12:26:21 +0000
commitea4a4fd3b2dbd95551d7925ec7d118ccd56420cb (patch)
tree699dd393c9b2bfa2314ea6cb4ac7ff7b93984b69 /doc
parent84f48521b8fa5a7ffd14d97c6f1b88708caabe16 (diff)
downloadscala-ea4a4fd3b2dbd95551d7925ec7d118ccd56420cb.tar.gz
scala-ea4a4fd3b2dbd95551d7925ec7d118ccd56420cb.tar.bz2
scala-ea4a4fd3b2dbd95551d7925ec7d118ccd56420cb.zip
- updated code for deprecated def-parameters.
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/ExamplesPart.tex2
-rw-r--r--doc/reference/ReferencePart.tex4
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/reference/ExamplesPart.tex b/doc/reference/ExamplesPart.tex
index c23bf4a9b5..66dd72486b 100644
--- a/doc/reference/ExamplesPart.tex
+++ b/doc/reference/ExamplesPart.tex
@@ -4482,7 +4482,7 @@ command need to be passed by-name, so that they are evaluated
repeatedly for each loop iteration. This leads to the following
definition of \code{whileLoop}.
\begin{lstlisting}
-def whileLoop(def condition: boolean)(def command: unit): unit =
+def whileLoop(condition: => boolean)(command: => unit): unit =
if (condition) {
command; whileLoop(condition)(command)
} else {}
diff --git a/doc/reference/ReferencePart.tex b/doc/reference/ReferencePart.tex
index ec62089df1..0887f72917 100644
--- a/doc/reference/ReferencePart.tex
+++ b/doc/reference/ReferencePart.tex
@@ -3180,8 +3180,8 @@ evaluated as if it was an application of ~\lstinline@whileLoop ($e_1$) ($e_2$)@~
the hypothetical function \code{whileLoop} is defined as follows.
\begin{lstlisting}
- def whileLoop(def c: boolean)(def s: unit): unit =
- if (c) { s ; while(c)(s) } else {}
+ def whileLoop(cond: => Boolean)(body: => Unit): Unit =
+ if (cond) { body ; while(cond)(body) } else {}
\end{lstlisting}
\example The loop