Path: utzoo!utgpu!water!watmath!clyde!burl!codas!mtune!mtgzz!dam From: dam@mtgzz.UUCP (XMRN40000[kvm]-d.a.morano) Newsgroups: comp.lang.c Subject: Re: Power operator? Summary: ** for power op Message-ID: <3492@mtgzz.UUCP> Date: 13 Jan 88 19:11:42 GMT References: <6982@brl-smoke.ARPA> <326@splut.UUCP> <327@splut.UUCP> <22773@hi.unm.edu> Organization: AT&T, Middletown NJ Lines: 22 In article <22773@hi.unm.edu>, kurt@hi.unm.edu (Kurt Zeilenga) writes: > I think they should use '@' instead of '*' (the unary > operator). This would free up '**' for the power operator. :-) Obviously, we can not change unary '*' to '@' and still have C, but this would have been an excellent choice for indirection back when K&R started to think about this. Those with a background of programming in DEC's assembly languages for the PDP-11 (and VAX) can appreciate this. As mentioned previously, the '**' can still be used for the power operator since the types of the operands can not be 'pointer to something'. In the following its use can be determined unambiguously when given a binary operator precedence : int a, *b, *c[], d ; d = a ** d ; d = a ***b ; /* is (a ** (*b)) */ d = *b****c ; /* although hard to see ((*b) ** (*(*c))) */ Dave Morano - AT&T