lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


You can always follow the rule:
When confused and in doubt,
  Use parentheses all about.

(Taken from Robert Heinlein's
 "When in trouble and in doubt,
   Run in circles, scream and shout" )

I got taught "Please Excuse My Dear Aunt Sally". Paren, exponent, multiply, divide, addition subtraction, so that is easy,

If it's code for just me, then parens when needed, if I'm teaching beginning programmers or someone else may read what I wrote, then all the parens needed to make it clear the order I/they were thinking. Taking seconds to add extra parens to save hours is a pretty simple choice.

Foster