IF statement condition expression - order of evaluation
Posted on 2006-06-23
Does VB have an order of evaluation of a boolean conditional expression inside an IF statement? I have some code that appears to be evaluating both terms of an OR expression even though the first term evaluates to true.
Example for clarity -
IF ((x < 0) Or (functionCall(x)) Then
In most languages, if x < 0, the function functionCall is never called.
Is this true for VB, or does VB evaluate all terms in the conditional?