Feb 3, 2010 at 1:11am UTC
my programming teacher says continue and break statements aren't good to use. but i have always used them. what are your guys opinion on the use of the break and continue keywords?
Feb 3, 2010 at 1:15am UTC
Like everything else, it depends on where/how they're used.
When used to interfere with loop control, they can increase complexity, but if used well, they can simplify code in an obvious way.
Last edited on Feb 3, 2010 at 1:17am UTC
Feb 3, 2010 at 1:17am UTC
As with everything, use them when you need them and it would be OK.
If you use them where is unnecessary / you have better options it wouldn't
Feb 3, 2010 at 1:20am UTC
Your teacher should go back to Pascal and leave C to the pros.
Feb 3, 2010 at 1:30am UTC
yes i agree, and i think he has only coded in VB professionally >.>
Feb 3, 2010 at 5:14pm UTC
Doesn't your teacher ever use the 'switch' structure? You usually need 'break' for that.