comma operator

Alan J Rosenthal flaps at dgp.toronto.edu
Sat Jul 29 07:40:33 AEST 1989


dandb at k.gp.cs.cmu.edu (Dean Rubine) writes:
>I also occasionally use the comma to save braces:
>	if((f = fopen(file, "r")) == NULL)
>		fprintf(stderr, "Can't open %s\n", file), exit(2);

Funny, I use braces to save commas:
	if ((f = fopen(file, "r")) == NULL) {
		fprintf(stderr, "Can't open %s\n", file);
		exit(2);
	}



More information about the Comp.lang.c mailing list