Anonymous user
Category:Elena: Difference between revisions
→Declaring a variable
Line 67:
The assigning value can be an expression itself:
public program
[
console writeLine("Hello!"); writeLine("How are you?").
var s := console readLine.
]
ELENA is a dynamic language and in normal case we may not specify the variable type:
public program
[
var s := "Hello".
Line 82:
s := 2.
console writeLine(s).
]
The output will be:
|