comma operator

Stephen Frede stephenf at softway.oz
Sun Aug 6 15:54:28 AEST 1989


> Can anybody tell me if there is a usage where the comma is 'better'.

Just to add another example to the fray

	while
	(
	    printf("enter a number: "), 
	    scanf("%f", &num) == 1
	)
	{
	    ...	/* calculations on num */
	}

			Regards,

				- Stephen Frede

Softway Pty Ltd, P.O. Box 305, Strawberry Hills, NSW 2012, AUSTRALIA
Phone: +61 2 698 2322; Fax: +61 2 699 9174; Telex: AA27987
ACSnet: stephenf at softway.oz	UUCP: ...!uunet!softway.oz!stephenf



More information about the Comp.lang.c mailing list