summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-03-13 13:28:46 +0000
committerpaltherr <paltherr@epfl.ch>2003-03-13 13:28:46 +0000
commit0f9346336d1ca5f6b5b2ec1c6187ca6ea61f8535 (patch)
tree3d82b622df0cc5f01f001fb15d813f189afb97ad /sources
parent76466c44df17548ecc659538062c2d176910e49d (diff)
downloadscala-0f9346336d1ca5f6b5b2ec1c6187ca6ea61f8535.tar.gz
scala-0f9346336d1ca5f6b5b2ec1c6187ca6ea61f8535.tar.bz2
scala-0f9346336d1ca5f6b5b2ec1c6187ca6ea61f8535.zip
- Added Interpreter.scala
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/Interpreter.scala32
1 files changed, 32 insertions, 0 deletions
diff --git a/sources/scala/Interpreter.scala b/sources/scala/Interpreter.scala
new file mode 100644
index 0000000000..c0768dc296
--- /dev/null
+++ b/sources/scala/Interpreter.scala
@@ -0,0 +1,32 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+package scala;
+
+module Interpreter {
+
+ def showValue(value: Any): Unit = {
+ if (value == null)
+ java.lang.System.out.println("null");
+ else
+ java.lang.System.out.println(value.toString());
+ }
+
+ def showDefinition(definition: String): Unit = {
+ java.lang.System.out.println(definition);
+ }
+
+ def showValueDefinition(definition: String, value: Any): Unit = {
+ java.lang.System.out.print(definition);
+ java.lang.System.out.print(" = ");
+ showValue(value);
+ }
+
+}