blob: 496944ca8ff78a2b48a2776f26172e71572acf7c [file] [log] [blame]
Jack Palevich43aaee32009-07-31 14:01:37 -07001int testReturn() {
2 return 10, 20, 30;
3}
4
5int testArg(int a) {
6 return a;
7}
8
9void testComma() {
10 int a;
11 0, a = 10,20;
12 printf("statement: %d\n", a);
13 a = 1;
14 if (a = 0, 1) {
15 printf("if: a = %d\n", a);
16 }
17 int b = 0;
18 a = 10;
19 while(b++,a--) {}
20 printf("while: b = %d\n", b);
21 b = 0;
22 for(b++,a = 0;b++, a < 10; b++, a++) {}
23 printf("for: b = %d\n", b);
24 b = testReturn();
25 printf("return: %d\n", b);
26 b = testArg((a,12));
27 printf("arg: %d\n", b);
28}
29
30
31
32int main() {
33 testComma();
34 return 0;
35}