Path: utzoo!mnetor!uunet!husc6!rutgers!ucla-cs!zen!ucbvax!hplabs!sdcrdcf!csun!aeusemrs From: aeusemrs@csun.UUCP (News Manager) Newsgroups: comp.lang.c Subject: Re: C blocks Message-ID: <970@csun.UUCP> Date: 17 Dec 87 07:40:20 GMT References: <470@PT.CS.CMU.EDU> <1966@chinet.UUCP> Reply-To: aeusemrs@csun.UUCP (Mike Stump) Organization: California State University, Northridge Lines: 18 In article <470@PT.CS.CMU.EDU> edw@IUS1.CS.CMU.EDU (Eddie Wyatt) writes: >Could the ANSI committee consider adding return values for blocks? >If they where added, I could guarentee my macro arguments where only >evaluated once as they are in function calls. Ah, yes, the joys of gcc: #define max(a, b) ({int _a=(a), _b=(b); _a > _b ? _a : _b; }) Nice, I think they missed something though because they do not appear to want the more general form: #define max(a, b) ({int _a=(a), _b=(b); return _a > _b ? _a : _b; }) Live and Learn... -- Mike Stump, Cal State Univ, Northridge Comp Sci Department uucp: {sdcrdcf, ihnp4, hplabs, ttidca, psivax, csustan}!csun!aeusemrs