Hi.
Ive been programing for nearly five months now so I am not a noob but I cannot understand this;
for ( variable = 1 ; variable < 100 ; variable += 1 ) { // some code if ( foofar ) continue ; else sumfunc () ; } <endpre> if i continue does the variable get added?
Ive been programing for nearly five months now so I am not a noob but I cannot understand this
In that case, you should really try to get your hands on a copy of K&R (*). It will answer questions like yours, and many more, very quickly and correctly, since the book was actually written by the people who created C in the first place.
From said book, on the continue statement: "[...]; in the for, control passes to the increment step.". The answer to your question is therefore "Yes.".
(*) B. W. Kernighan, D. M. Ritchie; "The C programming language"
You have to buy the full language standard, but you can at least get a committee draft for free: www.open-std.org/.../n1124.pdf
Here is links to buy the official releases: www.iso-9899.info/.../The_Standard
The standard isn't really so scary. You browse to the index at the back of the document, and look for "continue". Then you get sent to a section describing the continue, with code examples for "for", "while" and "do-while".
The standard is only scary if you decide from the start that it must be scary. But since it is the ultimate reference for a compiler vendor, it is a must for a developer to have handy.
It may not be a document you read from start to end when bored - or you may have to be bored to do it :) - but it is excellent to supply the answer if you have a doubt about something.