The legacy versions of If and For commands don't use curly braces. But there are no legacy versions of While and Do/While, which require curly braces. So rather than trying to remember which commands use or don't use curly braces, just use curly braces all the time for these, as well as Try/Catch.
Regarding post-conditionals, it's a good habit to put parentheses around the condition, which allows you to put spaces in the condition.
This is valid syntax: set:a=4 y=10
This is valid syntax and more readable: set:(a = 4) y = 10
This is invalid syntax: set:a = 4 y = 10
- Log in to post comments