Function XYZ()
print "Why evaluating XYZ? The If condition was already satisfied."
XYZ = false
End Function
Sub XXX
If true Or XYZ() Then
print "True"
End If
End Sub
Doing something like this and don’t want/need to evaluate subsequent conditions once the “If” is satisfied.
If ( _
( (X = "A") ) Or _
( (X = "B") And Not (Yn = Ys) ) Or _
( (X = "C") And Not (Mn = Ms) ) Or _
( (X = "D") And Not (Qn = Qr) ) Or _
) Then
do this ...
End If
If X is “A” do this…
If X is “B” And Yn does not equal Ys do this…
If X is “C” And Mn does not equal Ms do this…
If X is “D” And Qn does not equal Qr do this…
Why even when X is satisfied by “A” the subsequent conditions continue to be evaluated?
Is this an intended behavior with some purpose?