Code:
while (fgets(buf, sizeof(buf), fp) != NULL)
{
if (buf[0] == '#') continue;
/* now go process the line */
...
...
}
This is a ok place to use it here mainly because it's a pretty popular idiom. It's also probably in the code to
one of those functions such
as scanf. Most of the time you might have something like
Code:
while (fgets(buf, sizeof(buf), fp) != NULL)
{
if (buf[0] == '#')
continue;
if (buf[0] == ';')
continue;
// 50 lines of code that you don't want to indent
}
It is true that deep nesting makes things very hard to read. But this usually can be avoided by redesigning the algorithm.
I don't think so, but most of the boring stuft like parsing where
you might want to use continue can be done by a tool.