File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ This language is still currently experimental with many more features to come.
1616## Current features with working examples.
1717* [ Classes] ( examples/class.ls ) .
1818* [ Inheritance] ( examples/extends.ls ) .
19- * Functions.
20- * Variables.
19+ * [ Functions] ( examples/func.ls ) .
20+ * [ Variables] ( examples/variable.ls ) .
2121* Conditionals.
2222* Loops.
2323* Closures.
Original file line number Diff line number Diff line change 1+ // Declares a function
2+ func AddTwoNums(num_one , num_two ) {
3+ return num_one + num_two ;
4+ }
5+
6+ // Invokes function with two literals .
7+ print AddTwoNums(10 , 10 );
Original file line number Diff line number Diff line change 1+ // Assigns x to a string .
2+ var x = "hello there" ;
3+
4+ // Prints x .
5+ print x ;
6+
7+ // Reassigns x to a number .
8+ x = 10 ;
9+
10+ // Prints x .
11+ print x ;
You can’t perform that action at this time.
0 commit comments