example working with scala 2 (declaring values and variables)

Get The Hang

$ 4.2.29 1 501---> 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> val stat = data + ticks
:7: error: not found: value data
       val stat = data + ticks
                  ^

scala> val stat = data
:7: error: not found: value data
       val stat = data
                  ^

scala> val stat =  1
stat: Int = 1

scala> val plot  =  3
plot: Int = 3

scala> val out  = data + plot
:8: error: not found: value data
       val out  = data + plot
                  ^

scala> val out  = stat + plot
out: Int = 4

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