Having this as refrence:
Which one of the following will run faster? any as fast as the above?VB Code:
Dim i as integer For i=0 to 1000 'Some code here Next
1:
2:VB Code:
Dim i as Integer, J as Integer=1000 For i=0 to J 'Some code with no change in J value Next
3:VB Code:
Dim i as Integer, J as Integer=2000 For i=0 to J/2 ' Or any other operation on J 'Some code with no change in J value Next
4:VB Code:
Dim i as Integer Const J as Integer=1000 For i=0 to J 'Some code with no change in J value Next
VB Code:
Dim i as Integer Const J as Integer=2000 For i=0 to J/2 'or any other operation on J 'Some code with no change in J value Next




Reply With Quote