Drakath Posted June 6, 2014 Share Posted June 6, 2014 What is the difference between: if (source == marker) then and if source == marker then ? Link to comment
MIKI785 Posted June 6, 2014 Share Posted June 6, 2014 Simply none. I use brackets only when using arithmetic or when using more complex conditions. Link to comment
xXMADEXx Posted June 7, 2014 Share Posted June 7, 2014 If there is just one condition, or everything is split with and then there isn't really anything different. However, there is a difference if you have both ands and ors. Example, this: if ( c1 == c2 and ( f1 == f2 or x1 == x2 ) ) then isn't the same as this: if ( ( c1 == c2 and f1 == f2 ) or x1 == x2) then It sorta works the same way as math, running the conditions in parenthesizes first. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now