dillon@CORY.BERKELEY.EDU (Matt Dillon) (01/16/88)
I don't know about LSC, but the C comma operator returns the LAST element in the list. BUT you have to be careful when you use it in macros. always surround the whole thing with parenthesis so the priorities don't get switched around in usage. You should always put parenthesis around macro arguments when applicable. Imagine what would happen if there were none in the following example: #define blah(charlie) (ben,4-(charlie)) printf("test %ld\n", blah(a+b)) with no parenthesis, (1) you would getr 4-a+b instead of 4-(a+b), and (2) printf would think it's two arguments instead of one. This may be part of your problem. -Matt