Code: Select all
Dim b As Boolean, n As Short
If b And n = 5 Then
'Some statements
End If
OK, then I think, maybe it's associating b with n, trying to solve the And before the =, but then it should be an error, not a warning. The program runs fine, despite the warning. So I try to make things clearer like this:
Code: Select all
If b = True And n = 5 Then
Code: Select all
Dim p As Boolean, c As Short
If p And c = 1 Then Print "Hello"
If p = True And c = 1 Then Print "Hello"
If p AndAlso c = 1 Then Print "Hello"
If p = True AndAlso c = 1 Then Print "Hello"
If (c = 1) And p Then Print "Hello"
If c = 1 AndAlso p = True Then Print "Hello"
If (c = 1) AndAlso (p = True) Then Print "Hello"
GetKey