What precedence is BASCOM using in an IF sentence when you have AND and OR? Does AND always have higher precedence than OR?
Example:
[code:1:f74b16d8ba]If a = 2 AND b = 3 OR a = 1 Then
'Do things
End If[/code:1:f74b16d8ba]
In what order does the logical expressions get evaluated?
[code:1:f74b16d8ba]1: If (a = 2 AND b = 3) OR (a = 1) Then
2: If (a = 2) AND (b = 3 OR a = 1) Then[/code:1:f74b16d8ba]
Is 1 or 2 correct? I am guessing 1 is correct.
[b:f74b16d8ba][color=red:f74b16d8ba](BASCOM-AVR version : 2.0.7.5 , Latest : 2.0.7.6 )[/b:f74b16d8ba][/color:f74b16d8ba]
↧