Functions
Functions are declared using the func keyword.
Basic Function
func greet(var person){
println << "Hello, " + person c< 2 + ";
}
greet("Fellow Programmer");
Returning Values
Like in many languages, the return keyword returns the value of the function.
func sum(var num1, var num2){
return num1 + num2;
}
println << sum(6, 7) c<2;
Built-in Functions
println << "Hello Dear Programmer!" + "How are you doing?" c<5;
error << "Oh noes!";
print << "At the end of this line, there won't be a line jump." c<2;
As you may have noticed, the + can be used to concatenate strings, but this only applies to printing functions, not for variables yet.
The c<5 and c<2 are here to define the output color. You can learn everything about color codes here.