Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 13th, 2007, 7:17 AM   #1
funkey_monkey
Programmer
 
Join Date: May 2006
Posts: 34
Rep Power: 0 funkey_monkey is on a distinguished road
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.
funkey_monkey is offline   Reply With Quote
Old Mar 13th, 2007, 7:29 AM   #2
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 163
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
what language is this in ?
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old Mar 13th, 2007, 7:39 AM   #3
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3 kruptof is on a distinguished road
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:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote
Old Mar 13th, 2007, 8:19 AM   #4
funkey_monkey
Programmer
 
Join Date: May 2006
Posts: 34
Rep Power: 0 funkey_monkey is on a distinguished road
It's a dynamic loop.

Demon - it was not really wrote in any language - just a pseudocode.
funkey_monkey is offline   Reply With Quote
Old Mar 13th, 2007, 8:20 AM   #5
funkey_monkey
Programmer
 
Join Date: May 2006
Posts: 34
Rep Power: 0 funkey_monkey is on a distinguished road
By the way thanks for the replies!

funkey_monkey is offline   Reply With Quote
Old Mar 25th, 2007, 8:30 PM   #6
Rashakil
Newbie
 
Join Date: Dec 2006
Posts: 5
Rep Power: 0 Rashakil is on a distinguished road
It's called a freaking for loop. Don't create useless names for things.
Rashakil is offline   Reply With Quote
Old Jun 2nd, 2007, 1:50 AM   #7
Fall Back Son
Professional Programmer
 
Join Date: Oct 2006
Posts: 312
Rep Power: 3 Fall Back Son is on a distinguished road
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.
Fall Back Son is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:40 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC