|
-
Nov 24th, 2000, 06:59 AM
#1
Thread Starter
PowerPoster
What the different between
Code:
For i = 0 to 100
'Blah Blah blah......
Next
Code:
For i = 0 to 100
'Blah Blah Blah......
Next i
-
Nov 24th, 2000, 07:00 AM
#2
Addicted Member
Nothing at all.
It is a matter of preference. Some think that ending the loop w. next then the variable is easier to read.
-
Nov 24th, 2000, 07:08 AM
#3
New Member
no diff
there's no difference at all, if you say "Next" then VB will assume the previous For loop. If you say "Next i" VB will just continue with whichever For..Next statement that meets the criteria.
-
Nov 24th, 2000, 07:09 AM
#4
Member
It makes the code more clear for others to read as well as for your self. If you have many for-next cases, expecially when you jump between procedures, you can get confused easily.
With VB it's still not confusing even if you have 20 for-next cases, but take a look at the good old GW-Basic, where there was not even a debugger...God, that was confusing :-)
Life is trip, eat it and smile.
-
Nov 24th, 2000, 07:15 AM
#5
Thread Starter
PowerPoster
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|