apsync Posted May 6, 2005 Share Posted May 6, 2005 how do i 'or' for example -> If $A = 5 Or $B = 7 Then ;... EndIf is that valid? Link to comment Share on other sites More sharing options...
jpm Posted May 6, 2005 Share Posted May 6, 2005 how do i 'or' for example ->If $A = 5 Or $B = 7 Then ;... EndIfis that valid?<{POST_SNAPBACK}>When you read the language reference doc under operator you found out the operator precedence definition and you found out the = will take place before OR so your code is equivalent to If ($A = 5) Or ($B = 7) Then ;... EndIfI hope it is what you wantPLease look at the doc and report what can be missing or wrong Link to comment Share on other sites More sharing options...
Henrik Posted May 6, 2005 Share Posted May 6, 2005 Anyway you should always use parentheses in compound boolean expressions.- saves having to remember operator precedence (especially useful if you work in more than one programming language).- makes your code easier to maintain & less ambiguous for others to read.If ($A = 5) Or ($B = 7) Then If $A = (5 Or ($B = 7)) Then Ignorance is strength. Link to comment Share on other sites More sharing options...
apsync Posted May 6, 2005 Author Share Posted May 6, 2005 oh ok thank you botth Link to comment Share on other sites More sharing options...
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