what is it usefull for...i mean it looks like the alterations of the while loop kik the for loops
and the scope i mean whats this usefull for?if at all..
Printable View
what is it usefull for...i mean it looks like the alterations of the while loop kik the for loops
and the scope i mean whats this usefull for?if at all..
Never use for loops. They are useless. And that scope thing... sheesh, they could have come up with something better, don't you think?
quote from zeuscmd.com
lolQuote:
You should now understand how to use probably the most widely used loop of them all. In every useful program, you will find a number of for loops.
I was hoping you got the irony. But I'm afraid you didn't.
A while loop is usually used when one wants to process a set of expressions while a condition holds. A for loop, on the other hand (while retaining a similar principle) is better seen as a step loop.
Both loops are similar and on most situations interchangeable. However you will soon realize that they are both needed and that on some circumstances a for loop is the only sane way to go.
EDIT: By the way, a while loop also defines its own scope. Tough luck, eh?
:( oh great your not my freind anymor!!!!
jk