Category:Elena: Difference between revisions

Line 16:
To create a simple console program we have to declare the program symbol in the project root namespace:
 
public program =
[
].
Line 24:
The statement should be terminated by a dot (ELENA is inspired by Smalltalk and uses its syntax notations).
 
public program =
[
console writeLine("Hello!").
Line 33:
Several message operations can be done in a single statement separated by a semicolon:
 
public program =
[
console writeLine("Hello!"); writeLine("How are you?").
Line 45:
We may read a user input by sending readLine message without parameters:
 
public program =
[
console write("What is your name:"); writeLine("Hello " + console readLine).
Anonymous user