[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
!short: label            Label (target of a goto)

 label:  statement;

    Any statement may be preceded by a label.  Labels are only used as
    targets for goto statements.

      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.

                Statement labels within a function must be unique.

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

See Also: goto
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson