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")In reply to (tye)Re: parens question
by tye
in thread parens question
by nop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |