Example

Basic arithmetic and functions

Define numbers, write two small functions — one with returning, one without — then print the results.

Save this as a .alana file, then alana filename.alana. And start coding cute.

define num x is 10;
define num y is 3;

define func sub(num x, num y) returning num;
  return x - y;
end;

define func add(num x, num y);
  return x + y;
end;

define num z is call sub(x, y);
showln z;

define num k is call add(x, y);
showln k;