Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!hplabs!hpcea!hpfcdc!hpfelg!jk From: jk@hpfelg.HP.COM (John Kessenich) Newsgroups: comp.lang.c Subject: Re: Re: Power proposal for ANSI C -- we already have what we need Message-ID: <690004@hpfelg.HP.COM> Date: 1 Feb 88 16:17:34 GMT References: <3812@hoptoad.uucp> Organization: HP Elec. Design Div. -FtCollins Lines: 26 I have thought about using macros for squaring expressions, and problem is that they *do* require a temp. This makes it impossible to do the following: #define SQR(exp) ???? x = y + z * SQR(a+b); Either a temp must be available so one can write #define SQR(exp) (t=(exp), t*t) Or one must write #define SQR(x,exp) {int t; t=(exp); x = t*t;} which cannot be used in expressions. Conclusion? there is not a good substitute for a real power operator. (This does not mean there should be a power operator. :-) --------------- John Kessenich