|
|
1.1 ! root 1: ! 2: ! 3: case C Keyword case ! 4: ! 5: ! 6: ! 7: ! 8: Introduce entry in switch statement ! 9: ! 10: ! 11: The C keyword case is a label within a switch statement. For ex- ! 12: ample: ! 13: ! 14: ! 15: while ((int = getchar()) != EOF) ! 16: switch (foo) { ! 17: case 'q': ! 18: case 'Q': ! 19: exit(0); ! 20: case ' ': ! 21: n++; ! 22: default: ! 23: break; ! 24: } ! 25: ! 26: ! 27: case labels each of the three possibilities recognized by the ! 28: switch statement: a space, `q', and `Q'. The statements that ! 29: follow a case statement behave as if they were enclosed within ! 30: braces. ! 31: ! 32: Note that a case statement is simply a label: it sets a point to ! 33: which the switch statement jumps, and execution continues from ! 34: that point. Once a switch statement jumps to the point marked by ! 35: a given case label, execution continues until an exit, break, or ! 36: return is read, or the closing brace of the switch statement is ! 37: encountered. ! 38: ! 39: ***** See Also ***** ! 40: ! 41: break, C keywords, switch ! 42: ! 43: ! 44: ! 45: ! 46: ! 47: ! 48: ! 49: ! 50: ! 51: ! 52: ! 53: ! 54: ! 55: ! 56: ! 57: ! 58: ! 59: ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.