Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/control_structures.c

    ra61fea9a r4162aea9  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun  4 11:21:12 2015
    13 // Update Count     : 23
     12// Last Modified On : Wed May 27 18:07:42 2015
     13// Update Count     : 1
    1414//
    1515
    1616int main() {
    1717        L1: {
    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
     18                L2: switch ( 3_333_333 ) {                                              // underscores in constant
     19                        case 1,2,3:                                                                     // 4~8, 4...8 not working
     20                        case 4~8:
    2221                                L3: for ( ;; ) {
    2322                                        L4: for ( ;; ) {
     
    2625                                                break L3;
    2726                                                break L4;
     27
    2828                                                //continue L1;                                  // labelled continue - should be an error
    2929                                                //continue L2;                                  // should be an error
     
    3939                int i, j;
    4040                choose ( 7 ) {
    41                   case 1,2,3:
    42                         i = 3;
    43                         4;
    44                         fallthru;
    45                   case 4,5,6:
    46                         j = 3;
    47                   default: ;
     41                        case 1,2,3:
     42                                i = 3;
     43                                fallthru;
     44                        case 4,5,6:
     45                                j = 3;
     46                        default: ;
    4847                } // choose
    4948        } // block
Note: See TracChangeset for help on using the changeset viewer.