goto goto Statement
goto label;
The "infinitely-abusable goto statement" causes an unconditional jump
to a named label.
Notes: Any statement may have a label, however, labels are only
recognized by the goto statement. A label must be
followed by a statement, even if it is only the null
statement.
You cannot jump to a switch's `case' or `default' labels.
Statement labels within a function must be unique.
While many might consider it an unspeakably ugly
programming practice, it is possible to jump into a
compound statement or switch.
-------------------------------- Example ---------------------------------
for (i = 0; i < imax; ++i)
for (j = 0; j < jmax; ++i)
if (table[i][j] == value)
goto found;
printf("Can't find value in table\n");
exit(1);
found: statement;
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster