Allow multiple arguments to IO.print().

This commit is contained in:
Bob Nystrom
2014-04-09 07:48:35 -07:00
parent dfe65305c3
commit 7393e12555
14 changed files with 176 additions and 25 deletions
+5 -8
View File
@@ -26,8 +26,8 @@ var stretchDepth = maxDepth + 1
var start = IO.clock
IO.print("stretch tree of depth " + stretchDepth.toString + " check: " +
new Tree(0, stretchDepth).check.toString)
IO.print("stretch tree of depth ", stretchDepth, " check: ",
new Tree(0, stretchDepth).check)
var longLivedTree = new Tree(0, maxDepth)
@@ -44,13 +44,10 @@ while (depth < stretchDepth) {
check = check + new Tree(i, depth).check + new Tree(-i, depth).check
}
IO.print((iterations * 2).toString + " trees of depth " + depth.toString +
" check: " + check.toString)
IO.print((iterations * 2), " trees of depth ", depth, " check: ", check)
iterations = iterations / 4
depth = depth + 2
}
IO.print("long lived tree of depth " + maxDepth.toString + " check: " +
longLivedTree.check.toString)
IO.print("elapsed: " + (IO.clock - start).toString)
IO.print("long lived tree of depth ", maxDepth, " check: ", longLivedTree.check)
IO.print("elapsed: ", (IO.clock - start))
+1 -1
View File
@@ -713,5 +713,5 @@ for (i in 0...20) {
}
IO.print(total)
IO.print("elapsed: " + (IO.clock - start).toString)
IO.print("elapsed: ", IO.clock - start)
+1 -1
View File
@@ -7,4 +7,4 @@ var start = IO.clock
for (i in 1..5) {
IO.print(fib.call(28))
}
IO.print("elapsed: " + (IO.clock - start).toString)
IO.print("elapsed: ", IO.clock - start)
+1 -1
View File
@@ -7,4 +7,4 @@ var sum = 0
for (i in list) sum = sum + i
IO.print(sum)
IO.print("elapsed: " + (IO.clock - start).toString)
IO.print("elapsed: ", IO.clock - start)
+1 -2
View File
@@ -65,5 +65,4 @@ for (i in 0...n) {
}
IO.print(ntoggle.value)
IO.print("elapsed: " + (IO.clock - start).toString)
IO.print("elapsed: ", IO.clock - start)