Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Speed testing
#13
Example code:
Code:
l = 2
    Select Case l
        Case 1
            b = True
        Case 2
            b = True
        Case 3
            b = True
        Case 4
            b = True
    End Select

Once it found case 2 and does what it needs to - it will exit the select case. So it looks like it doesn't evalute every expression.

Code:
l = 2
    If l = 1 Then
        b = True
    End If
    
    If l = 2 Then
        b = True
    End If
    
    If l = 3 Then
        b = True
    End If
    
    If l = 4 Then
        b = True
    End If

Doing that - it would have to check every statement unless you tell it to exit the sub or something.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)