2016-01-11 23:41:09 -05:00
|
|
|
import to_import: simple_print, a, b
|
2015-12-26 01:52:29 +00:00
|
|
|
|
2016-01-05 21:40:00 -05:00
|
|
|
obj Something (ObjectTrait) {
|
|
|
|
|
var member: int
|
|
|
|
|
fun method():int {
|
|
|
|
|
return 5
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-07 02:52:22 -05:00
|
|
|
fun some_function(): int return 0;
|
|
|
|
|
fun some_other_function(in: bool): float {
|
|
|
|
|
return 0.0
|
2015-12-26 01:52:29 +00:00
|
|
|
}
|
2016-01-10 18:26:31 -05:00
|
|
|
fun main(): int {
|
2016-01-15 19:10:52 -05:00
|
|
|
var a_declaration:int
|
2016-01-18 18:04:34 -05:00
|
|
|
simple_print(1 + 2)
|
|
|
|
|
var again = 2 + 4 - 1 * 400
|
|
|
|
|
simple_print(again)
|
2016-01-18 18:10:07 -05:00
|
|
|
again = 2 + (4 - 1) * 400
|
|
|
|
|
simple_print(again)
|
2016-01-17 01:10:09 -05:00
|
|
|
var another_declaration: int = 8.0
|
|
|
|
|
simple_print(another_declaration)
|
|
|
|
|
var yet_another_declaration = "Hello Marcus\n"
|
|
|
|
|
simple_print(yet_another_declaration)
|
2016-01-13 21:09:28 -05:00
|
|
|
simple_print("Hello World!\n")
|
|
|
|
|
simple_print(1337)
|
2016-01-19 02:06:30 -05:00
|
|
|
if (1 + 2 && false) simple_print("its true!")
|
|
|
|
|
else simple_print("its false!")
|
2016-01-10 18:26:31 -05:00
|
|
|
return 0
|
|
|
|
|
}
|
2015-12-26 01:52:29 +00:00
|
|
|
|