06-03-2024, 08:58 PM
Quote:I'd suggest trying another download and extract to a fresh directory. 13.1 definitely has _OrElse in it, and it should definitely NOT be white for you. (It should be the same color as all the rest of your keywords.)Sorry, I only saw it now. - The example from the wiki works (it can't be the download version):
If a fresh download doesn't fix the glitch, then we'll want to know what OS/version you downloaded and are using, and we'll need to look into what the heck is going on. The simple fact that nobody else has mentioned it not working, however, leads me to believe that your version is corrupted, or out of date, or pathing wrong, or some other add issue.
Code: (Select All)
Print "Trying _ORELSE"
' _ORELSE performs short-circuiting logical conjunction and hence for "strawberry", only isFruit() is called
If isFruit("strawberry") _Orelse isRed("strawberry") _Orelse isSeasonal("strawberry") Then
Print "Probably a strawberry."
Else
Print "Certainly not a strawberry."
End If
Print
Print "Trying OR"
' OR does not performs short-circuiting logical conjunction and hence all is***() functions are called
If isFruit("strawberry") Or isRed("strawberry") Or isSeasonal("strawberry") Then
Print "Probably a strawberry."
Else
Print "Certainly not a strawberry."
End If
End
Function isFruit%% (fruit As String)
Print "isFruit() called!"
isFruit = (fruit = "strawberry")
End Function
Function isRed%% (fruit As String)
Print "isRed() called!"
isRed = (fruit = "strawberry")
End Function
Function isSeasonal%% (fruit As String)
Print "isSeasonal() called!"
isSeasonal = (fruit = "strawberry")
End Function
Your version with _OrElse still shows an error.
My system: Windows 10 Prof, latest updates.