In our first ELENA 2.0 tutorial let’s create a simple console program.
First we have to create a new project: File - New - Project. In the open dialog we have to select: Project type – console; Namespace – example1; Target file name – example1 and press OK.
Next let’s create a source file: File – New – Source File
Before continue we have to save it: File – Save All (IDE will ask if the new module should be included into the project – press Yes).
Now we are going to write our program. We will start with declaring the program main body – code symbol:
To print the message we have to send the message writeLine to system’console symbol:
After that we will wait for the user action.
Let’s make a simple optimization. We could declare system namespace so no need to write it every time. So our program looks like this:
Before compiling the project we have to assign the program entry to our symbol. So select Project – Forwards…
In the open dialog enter the following line : 'program=example1'program, press Add and Save. (Starting from 1.9.24 this is no longer required. It is enough to declare program closure in the root name space)
Now we can run our program: Debug – Run.