As far as I know the inside of loops is the ONLY place you can use a continue. I hope you realsie, however, that continue means "lets get on with the next iteration"
In other words if you had the following code:
-
for(a=start; a< finish; a=a++)
-
{
-
myValue=importantValue();
-
if(myValue==SOME_IMPORTANT_CONSTANT)
-
{
-
continue;
-
}
-
doSomething();
-
}
-
then "doSomething" would NOT be executed in the case tahat we reached the continue statement.
If you want something more like "if(some case) doNothing else doSomething", then consider rephrasing the if to be "if (!(some case))" OR alternatively, have an empty if (whioch is not considered good practice but is syntactically legal)
-
if(!dontCareValue)
-
{
-
betterDoSomething();
-
}
-
-
-
/* Or a not so clean solution */
-
-
-
if(dontCareValue) /* do nothing for if (we could omit {} and use ; if we really wanted */
-
{}
-
else
-
{
-
betterDoSometing();
-
}
-