![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: May 2006
Posts: 34
Rep Power: 0
![]() |
Correct name for a variable length loop?
If I have a loop construct looping between i = 0 and i = 10 like below
for(i=0, i=10, i++) { ... } and changed it to for(i=0, i=x, i++) { ... } What is the name for the loop construct in the second instance. I believe there to be a specific name for this construct - I don't think variable length loop is the name I am looking for. |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
what language is this in ?
|
|
|
|
|
|
#3 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3
![]() |
I think a for loop is a pre-test loop just like the while loop because you are testing it first before you actually do anything the loop's body,unlike the do while loop where you (post) test it afterwards.
__________________
Quote:
|
|
|
|
|
|
|
#4 |
|
Programmer
Join Date: May 2006
Posts: 34
Rep Power: 0
![]() |
It's a dynamic loop.
Demon - it was not really wrote in any language - just a pseudocode. |
|
|
|
|
|
#5 |
|
Programmer
Join Date: May 2006
Posts: 34
Rep Power: 0
![]() |
By the way thanks for the replies!
![]() |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Dec 2006
Posts: 5
Rep Power: 0
![]() |
It's called a freaking for loop. Don't create useless names for things.
|
|
|
|
|
|
#7 |
|
Professional Programmer
Join Date: Oct 2006
Posts: 312
Rep Power: 3
![]() |
In C it's just a while or a for depending on what you're doing with it, if I'm not mistaken. Maybe you have some magic up your sleeve, but it should either be event or counter controlled... while for event, and for for counter.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Serial Port Programming | Fatman | C++ | 4 | May 26th, 2006 5:14 PM |
| Compiling Maverik 6.2 (from C) | megamind5005 | C | 16 | May 3rd, 2006 6:41 PM |
| Help in QBASIC (I think it's similar to VB) | phoenix987 | Visual Basic | 3 | May 9th, 2005 1:33 PM |
| Help with a QBASIC program | phoenix987 | Other Programming Languages | 4 | May 5th, 2005 1:27 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 5:12 PM |