Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!husc6!hao!ames!sdcsvax!ucsdhub!esosun!seismo!uunet!mcvax!eutrc3!wswietse From: wswietse@eutrc3.UUCP (Wietse Venema) Newsgroups: comp.lang.c Subject: Re: comma operator Summary: blocks do return value Message-ID: <172@eutrc3.UUCP> Date: 22 Jan 88 09:59:19 GMT References: <11335@brl-adm.ARPA> Organization: Tech. Univ. Eindhoven, Neth. Lines: 19 In article <11335@brl-adm.ARPA>, mrd@sun.mcs.clarkson.EDU (Michael R. DeCorte) writes: > I would like something to the effect > > int x; > > printf("%d\n", {int a;.....; a=x;}); > > in others words, a block can return a value. Gee think of the #defines > you could make Michael, ever thought of trying foo(..) {int a;...;return(a=x);} printf("%d\n",foo(...)); Gee think of the functions you could make :-) Wietse (...!mcvax!eutrc3!wswietse) Venema