Fixed order of operations

This commit is contained in:
2023-03-07 06:49:17 +11:00
parent f869c9425a
commit f84cdff883
2 changed files with 12 additions and 5 deletions

View File

@@ -38,5 +38,12 @@ s += "bar";
assert s == "foobar", "string addition failed (wasn't sticky enough)";
//check order of operations
assert 30 / 3 * 2 == 20, "Order of operations failed (raw numbers)";
var x = 30;
var y = 3;
var z = 2;
assert x / y * z == 20, "Order of operations failed (variables)";
print "All good";