Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>label label (target of a goto)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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; ++j){
                       if (table[i][j] == value)
                           goto found;
                       }
           }
               printf("Can't find value in table\n");
               return(1);

           found:   statement;


See Also: goto

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson