Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - switch and case and default http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   switch and case and default

       switch(expression)
       {
           case constant1:
                statement();
                break;
           .
           .
           case constantn:
                statement();
                break;

           default:
                statement();
                break;
       }

   Expression  is  evaluated  and compared  against  constant  expression
   values constant1 to constantn.  If a match is found all the statements
   that follow,  upto and including the break, are obeyed. If no match is
   found then the default if present will be obeyed.


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