Poll: Which is better
for loops
while loops
[Show Results]
Note: This is a public poll, other users will be able to see what you voted for.
Post Reply 
loops
Author Message
ProperBritish
Daddy Proper
Team DreamArts

Posts: 5,666.3250
Threads: 192
Joined: 19th Nov 2008
Reputation: -2.36574
E-Pigs: 147.7035
Offline
Post: #3
RE: loops
i use for loops much more than while ones, because they're more verbose and make my code easier to understand.
the incrementing element, breaking condition and iterator is all there.

i only use while loops for stuff that isn't an integer increment, like:

Code:
while(!pIfstream.eof())
{
       cout << var << endl;
}


I've only been programming for a year and a half, so my use of looping so far i would say is rather limited compared to more seasoned programmers.


[Image: rsz_contrast.png]

Spoiler for More sigs:
[Image: 6xu74t8]
[Image: sig.php]

[Image: 656embk]
[Image: sig.png]
(This post was last modified: 10/03/2012 07:20 AM by ProperBritish.)
10/03/2012 07:16 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
loops - Assassinator - 10/03/2012, 03:20 AM
RE: loops - Rawrsor - 10/03/2012, 07:04 AM
RE: loops - ProperBritish - 10/03/2012 07:16 AM
RE: loops - whjms - 10/03/2012, 07:36 AM
RE: loops - trademark91 - 10/03/2012, 12:25 PM
RE: loops - Assassinator - 10/03/2012, 06:04 PM
RE: loops - Kuu - 11/03/2012, 03:01 AM
RE: loops - ZiNgA BuRgA - 11/03/2012, 04:12 AM
RE: loops - ProperBritish - 11/03/2012, 09:39 AM
RE: loops - Silvertie - 12/03/2012, 05:56 AM
RE: loops - ZiNgA BuRgA - 12/03/2012, 02:26 PM
RE: loops - hibbyware - 12/03/2012, 03:40 PM
RE: loops - boogschd - 13/03/2012, 08:06 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: