summaryrefslogtreecommitdiff
path: root/doc/reference/ScalaByExample.tex
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-11-07 12:11:21 +0000
committerMartin Odersky <odersky@gmail.com>2003-11-07 12:11:21 +0000
commit4bab79034d0056fb9982cbf31491880f961f8b53 (patch)
tree8cfdc73de23393c12c83098e57fcef34839afeb1 /doc/reference/ScalaByExample.tex
parentfc7e1bce49d8fd89b25b70277237ed41fb24965d (diff)
downloadscala-4bab79034d0056fb9982cbf31491880f961f8b53.tar.gz
scala-4bab79034d0056fb9982cbf31491880f961f8b53.tar.bz2
scala-4bab79034d0056fb9982cbf31491880f961f8b53.zip
*** empty log message ***
Diffstat (limited to 'doc/reference/ScalaByExample.tex')
-rw-r--r--doc/reference/ScalaByExample.tex4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/reference/ScalaByExample.tex b/doc/reference/ScalaByExample.tex
index bea8c37665..7849be4882 100644
--- a/doc/reference/ScalaByExample.tex
+++ b/doc/reference/ScalaByExample.tex
@@ -1397,9 +1397,9 @@ As an example of how rational numbers can be used, here's a program
that prints the sum of all numbers $1/i$ where $i$ ranges from 1 to 10.
\begin{lstlisting}
var i = 1;
-var x = Rational(0, 1);
+var x = new Rational(0, 1);
while (i <= 10) {
- x = x + Rational(1,i);
+ x = x + new Rational(1,i);
i = i + 1;
}
System.out.println(x.numer + "/" + x.denom);