Hi Steven,

As you've seen from all the answers so far, precedence matters with
operators. The Core guide says (in the Math section) that there are just two
rules:

    Expressions are evaluated from left to right.
    Operators take precedence over functions.

For a long time while I was learning REBOL I basically ignored operators
like +, -, * etc. Instead I used their function equivalents: Add, Subtract,
Multiply. Once I got comfortable with the precedence rules of operators I
started using a mix. Eg.

    Add 3 * X  4 * Y

instead of

    (3 * X) + (4 * Y)

Every now and then I get the precedence stuff mixed up and instead of
inserting heaps of paren! I revert to using the function style.

Most recently, after Joel's post on coding habits and the effect of changing
them, I've started using a different habit for If conditions more akin to
the other posts.

    if x = 4 * Y [...]

Regards,
Brett.


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to