Instructions

  • Install Prolix (if you haven't already).
  • Write some simple "Hello, world" code.
  • Use the prolix binary to run your code.

Install Prolix

Download a specific version of Prolix by clicking here.

Write some code

Now create a new file and name it main.prlx and you can write a simple program like Hello, World below:

$io:write "Hello, World!\n";

The code above uses a predefined library named io and changes the value of the write attribute to write the object directly to the console.

Run your code to see the greeting.

prolix main.prlx

More examples

Factorial of a number using loop:

class result;
result $result;
$result:num 7;
$result:result 1;
$result:i 1;
loop $result:num {
    $math:mul $result:result $result:i;
    $result:result $math:result;
    $math:add $result:i 1;
    $result:i $math:result;
}
$io:write "The factorial of "
    :write $result:num
    :write " is "
    :write $result:result
:write "\n";