in reply to Re: parens question
in thread parens question
Saying the same thing in a different way: An if after a statement ends quite simply at the ; token. If you left the parens off of the full if statement, the expression would end at the { that starts the block. But a { token, unlike a ; token, can also appear in an expression.
So, the parens are required in the full if statement to make finding the end of the Boolean expression easy (easy enough that not a lot of look-ahead is required).
- tye (but my friends call me "Tye")
|
|---|