example working with scala 3

Get The Hang

$ 4.2.29 2 502---> scala
Welcome to Scala version 2.9.2 (OpenJDK 64-Bit Server VM, Java 1.6.0_24).
Type in expressions to have them evaluated.
Type :help for more information.

scala> va a, b = 10
:1: error: ';' expected but ',' found.
       va a, b = 10
           ^

scala> val a, b = 10
a: Int = 10
b: Int = 10

scala> a*b
res0: Int = 100

scala> val a, b :String = hello
:7: error: not found: value hello
       val a, b :String = hello
                          ^

scala> var a, b :String = hello
:7: error: not found: value hello
       var a, b :String = hello
                          ^

scala> var a, b :String = "hello"
a: String = hello
b: String = hello

scala> echo a
:8: error: not found: value echo
              echo a
              ^

scala>  a
res2: String = hello

scala>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s