Take the following math expression:
3 * 3 + 3
You would multiply 3 by 3 first and then add the 3, giving 12.
In Harlowe
(set: $a = 3 * 3 + 3)
(set: $b = 3 + 3 * 3)
$a
$b
Will show as
18
12
Which looks like Harlowe solves math expressions from right to left.
In case you were curious SugerCube and Snowman both works fine with this example:
Snowman
<%
$a = 3 * 3 + 3; print($a + "<br>");
$b = 3 + 3 * 3; print($b);
%>
12
12
Sugercube
<<set $a to 3 * 3 + 3>>
<<set $b to 3 + 3 * 3>>
$a
$b
12
12
Versions tested:
Harlowe 1.0.1
Snowman 1.0
SugarCube 1.0.23
Comments
Operator precedence is a standard feature in every language. Why would you want to force parenthesis around every single operation when it's not necessary...?
I was always taught never to leave math open for interpretation.