Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month! Zortech C++ 3.0r4 - <b>goto goto statement</b> [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
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

                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");

           found:   statement;

See Also: label

Online resources provided by: --- NG 2 HTML conversion by Dave Pearson