|
-
Jun 4th, 2005, 07:24 PM
#1
Thread Starter
New Member
Too many loops
I am coming from C/C++ and I am teaching myself VB. If there is a FAQ posted and I missed it, I apologize.
On to the question - why are there so many loops in VB? You have while, do while/loop, do until/loop, do loop/while, and do/loop until. It seems to me that while and do while/loop are exactly the same and do loop/while is only slightly different, and that do until/loop and do/loop until are redundant too.
Why the need for 5 loop structures that only do 2 things? Do VB programmers commonly use 2 of these and ignore the others for readability or is there some subtlety that I am missing?
-
Jun 4th, 2005, 07:48 PM
#2
PowerPoster
Re: Too many loops
Hi,
Wait until you have completed a few commercial programmes and you will then appreciate the flexibility. Yes, it is possible to make do with a D0......Loop in every case, but you will need to fill it with value checks which will take more time and effort than using an appropriate Loop.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jun 4th, 2005, 07:49 PM
#3
Re: Too many loops
Actually most VB programmers use a For Each loop more than any other kind. But also generally speaking the Do While and Do Until loops are most common.
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
|