Public Sub Main() Dim bTest As Boolean Dim iValue As Integer = [1, 2] If bTest And iValue = 5 Then Print "Hello" End
4 posts • Page 1 of 1
- Site Admin
- Posts: 192
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
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 does not exist. I would have expected that iValue would not be checked as the first part failed. Does this happen in other languages?