- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/control_structures.c
r4162aea9 ra61fea9a 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 27 18:07:42 201513 // Update Count : 112 // Last Modified On : Thu Jun 4 11:21:12 2015 13 // Update Count : 23 14 14 // 15 15 16 16 int main() { 17 17 L1: { 18 L2: switch ( 3_333_333 ) { // underscores in constant 19 case 1,2,3: // 4~8, 4...8 not working 20 case 4~8: 18 L2: switch ( 3_333_333 ) { // underscores in constant 19 case 1,2,3: // CFA 20 case 4~8: // CFA 21 case 9 ... 10: // gcc, must have spaces 21 22 L3: for ( ;; ) { 22 23 L4: for ( ;; ) { … … 25 26 break L3; 26 27 break L4; 27 28 28 //continue L1; // labelled continue - should be an error 29 29 //continue L2; // should be an error … … 39 39 int i, j; 40 40 choose ( 7 ) { 41 case 1,2,3: 42 i = 3; 43 fallthru; 44 case 4,5,6: 45 j = 3; 46 default: ; 41 case 1,2,3: 42 i = 3; 43 4; 44 fallthru; 45 case 4,5,6: 46 j = 3; 47 default: ; 47 48 } // choose 48 49 } // block
Note:
See TracChangeset
for help on using the changeset viewer.