File:  [MW Coherent from dump] / coherent / a / usr / man / ALL / case
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



case                        C Keyword                        case




Introduce entry in switch statement


The C keyword case is a label within a switch statement.  For ex-
ample:


        while ((int = getchar()) != EOF)
                switch (foo) {
                        case 'q':
                        case 'Q':
                                exit(0);
                        case ' ':
                                n++;
                        default:
                                break;
                }


case  labels each  of the three  possibilities recognized  by the
switch  statement: a  space, `q', and  `Q'.  The  statements that
follow a  case statement behave  as if they  were enclosed within
braces.

Note that a case statement is  simply a label: it sets a point to
which the  switch statement  jumps, and execution  continues from
that point.  Once a switch statement jumps to the point marked by
a given case label,  execution continues until an exit, break, or
return is  read, or the closing brace of  the switch statement is
encountered.

***** See Also *****

break, C keywords, switch






















COHERENT Lexicon                                           Page 1



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.