We can jump to any statement inside the same function using goto. To spot the end point of the jump a label (tag) is used. goto statement is not to ideal to choose in any programming language because it makes difficult to trace the flow of a program, makes the program hard to understand, and to guess the output.
void any_function(void)
{
for( ... )
if (problem) goto error;
error:
solve problem
}
But in the example above, remember that the code could be rewritten as:
void function1(void)
{
for( ... )
if (problem)
{
solve problem
return;
}
}
About goddem
Templatesyard is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates which are professionally designed and perfectlly seo optimized to deliver best result for your blog.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment