summaryrefslogtreecommitdiff
path: root/test/disabled/script/fact.bat
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-29 20:22:22 +0000
committerPaul Phillips <paulp@improving.org>2011-03-29 20:22:22 +0000
commit88fbb71848b56ae5cb2b8ad7833cde21ce3937d9 (patch)
treec550433c5657b1477704d90fb4836775c798dbed /test/disabled/script/fact.bat
parent1caac54694602ad5ae48c3cbb8394b7263b132e4 (diff)
downloadscala-88fbb71848b56ae5cb2b8ad7833cde21ce3937d9.tar.gz
scala-88fbb71848b56ae5cb2b8ad7833cde21ce3937d9.tar.bz2
scala-88fbb71848b56ae5cb2b8ad7833cde21ce3937d9.zip
Disabled all the script tests.
breaking the distribution build. No review.
Diffstat (limited to 'test/disabled/script/fact.bat')
-rwxr-xr-xtest/disabled/script/fact.bat17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/disabled/script/fact.bat b/test/disabled/script/fact.bat
new file mode 100755
index 0000000000..bee0ba25c6
--- /dev/null
+++ b/test/disabled/script/fact.bat
@@ -0,0 +1,17 @@
+::#!
+:: fact - A simple Scala batch file that prints out the factorial
+:: of the argument specified on the command line.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+
+val x = argv(0).toInt
+
+def fact(x: Int):Int =
+ if(x==0) 1
+ else x*fact(x-1)
+
+Console.println("fact(" + x + ") = " + fact(x))