diff --git a/lolcode/spec/expressions.rst b/lolcode/spec/expressions.rst index 6b829a9..9ea7df3 100644 --- a/lolcode/spec/expressions.rst +++ b/lolcode/spec/expressions.rst @@ -21,17 +21,6 @@ Math is performed as integer math in the presence of two ``NUMBR`` s. If either of the arguments is a ``YARN``, the ``YARN`` is converted to an integer and the operation proceeds if the conversion succeeds. -Precedence -~~~~~~~~~~ - -Multiplication, division and modulo have the highest precedence. All three -operators have equal precedence and are evaluated left to right. -Addition and subtraction have equal precedence and are also evaluated left to -right. - -Parenthesis ('()') can be used to group operations to override precedence or -clarify the evaluation order. - Conditions ~~~~~~~~~~ @@ -42,8 +31,7 @@ LOLCODE supports two conditional operators: BIGGR OF AN BTW max SMALLR OF AN BTW min -These operators apply to both strings and integers. Since both types are -supported, the types of ```` and ```` must match. +These operators apply to both strings and integers. As with the math operators above, if either argument is a ``YARN``, it is converted to an integer and the operation proceeds if the conversion succeeds. Concatenation ~~~~~~~~~~~~~ diff --git a/lolcode/spec/statements.rst b/lolcode/spec/statements.rst index 6898a23..523f60f 100644 --- a/lolcode/spec/statements.rst +++ b/lolcode/spec/statements.rst @@ -16,6 +16,8 @@ Our version of LOLCODE supports seven types of statements: If-then ~~~~~~~ +A bare expression statement (one not assigned to a variable) stores its result in the implicit variable ``IT``. ``IT`` holds that value until the next bare expression replaces it, and is what ``O RLY?`` and ``WTF?`` test against. + An if statement begins with a comparison: Comparison is (currently) done with two binary equality operators: @@ -179,7 +181,7 @@ Iteration loops have the form: Where ```` may be ``UPPIN`` (increment by one) or ``NERFIN`` (decrement by one). That operation/function is applied to the ````, which is temporary, and local to the loop. -The ``TIL `` evaluates the expression as a boolean: if it evaluates as false, the loop continues once more, if not, then loop execution stops, and continues after the matching ``IM OUTTA YR