Home
       0032-indec.c - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
       0032-indec.c (396B)
       ---
            1 int
            2 zero()
            3 {
            4         return 0;
            5 }
            6 
            7 int
            8 one()
            9 {
           10         return 1;
           11 }
           12 
           13 int
           14 main()
           15 {
           16         int x;
           17         int y;
           18         
           19         x = zero();
           20         y = ++x;
           21         if (x != 1)
           22                 return 1;
           23         if (y != 1)
           24                 return 2;
           25         
           26         x = one();        
           27         y = --x;
           28         if (x != 0)
           29                 return 3;
           30         if (y != 0)
           31                 return 4;
           32         
           33         x = zero();
           34         y = x++;
           35         if (x != 1)
           36                 return 5;
           37         if (y != 0)
           38                 return 6;
           39         
           40         x = one();
           41         y = x--;
           42         if (x != 0)
           43                 return 7;
           44         if (y != 1)
           45                 return 8;
           46         
           47         return 0;
           48 }