summaryrefslogtreecommitdiff
path: root/test/files/run/Course-2002-08.scala
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-03-18 12:05:24 +0000
committerpaltherr <paltherr@epfl.ch>2003-03-18 12:05:24 +0000
commit820c818d4eb549c59394f0dc1d36912975ba9fcd (patch)
tree9c3fb77e1290034f34520962373c2cba75cc6dd9 /test/files/run/Course-2002-08.scala
parentdb1ad8a9e021cacc9a88fadd8dd51e849f4b5143 (diff)
downloadscala-820c818d4eb549c59394f0dc1d36912975ba9fcd.tar.gz
scala-820c818d4eb549c59394f0dc1d36912975ba9fcd.tar.bz2
scala-820c818d4eb549c59394f0dc1d36912975ba9fcd.zip
- Fixed to use the new definition of range
Diffstat (limited to 'test/files/run/Course-2002-08.scala')
-rw-r--r--test/files/run/Course-2002-08.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/run/Course-2002-08.scala b/test/files/run/Course-2002-08.scala
index c1589d3bf5..2e1cb37758 100644
--- a/test/files/run/Course-2002-08.scala
+++ b/test/files/run/Course-2002-08.scala
@@ -136,9 +136,9 @@ module M3 {
module M4 {
def test = {
- for (val i <- range(1, 3)) do { System.out.print(i + " ") };
+ for (val i <- range(1, 4)) do { System.out.print(i + " ") };
System.out.println();
- System.out.println(for (val i <- range(1, 3)) yield i);
+ System.out.println(for (val i <- range(1, 4)) yield i);
System.out.println();
}
}
@@ -555,14 +555,14 @@ class Main() extends CircuitSimulator() {
val outNum = 1 << n;
val in = new Wire();
- val ctrl = for (val x <- range(0,n-1)) yield { new Wire() };
- val out = for (val x <- range(0,outNum-1)) yield { new Wire() };
+ val ctrl = for (val x <- range(0,n)) yield { new Wire() };
+ val out = for (val x <- range(0,outNum)) yield { new Wire() };
demux(in, ctrl.reverse, out.reverse);
probe("in", in);
- for (val Pair(x,c) <- range(0,n-1) zip ctrl) do { probe("ctrl" + x, c) }
- for (val Pair(x,o) <- range(0,outNum-1) zip out) do { probe("out" + x, o) }
+ for (val Pair(x,c) <- range(0,n) zip ctrl) do { probe("ctrl" + x, c) }
+ for (val Pair(x,o) <- range(0,outNum) zip out) do { probe("out" + x, o) }
in.setSignal(True);
run;