Jump to content

Category:Elena: Difference between revisions

Line 59:
== Declaring a variable ==
 
A variable can be declared in an assignment statement starting with **var** attribute:
 
var myVariable := "A text".
 
where we declare a variable **myVariable** and initialize it with a literal constant value.
 
The assigning value can be an expression itself:
Line 94:
console writeLine(s).
 
*where system'LiteralValue is a class representing text as a sequence of UTF-8 characters.*
 
We may use a class alias to simplify the code:
Line 112:
s := 2 literal.
 
It is guaranteed that the result of **literal** message is an instance of LiteralValue, so if the object supports the message the conversion will be done quietly. In fact this code will work because **IntNumber** supports this conversion. But the following code will be broken in run-time:
 
int n := 3.
Line 128:
system'#inline1BF.start[1]:win32_app.l(37)
system'startUp(5)
 
== Basic Types ==
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.