"And" query
Posted: Friday 10th November 2017 4:15pm
If you look at the code below you will see that the IF statement will fail as bTest is False so why do I get an 'Out of bounds' error from the fact that iValue[2] does not exist. I would have expected that iValue would not be checked as the first part failed. Does this happen in other languages?
Public Sub Main()
Dim bTest As Boolean
Dim iValue As Integer[] = [1, 2]
If bTest And iValue[2] = 5 Then Print "Hello"
End