Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!mcvax!dik From: dik@mcvax.UUCP Newsgroups: comp.lang.c Subject: Re: Unary plus (and wysiwyg order or evaluation) Message-ID: <348@zuring.mcvax.cwi.nl> Date: Sun, 12-Apr-87 11:57:47 EST Article-I.D.: zuring.348 Posted: Sun Apr 12 11:57:47 1987 Date-Received: Tue, 14-Apr-87 00:05:23 EST References: <6772@brl-adm.ARPA> <803@viper.UUCP> <752@rtech.UUCP> Reply-To: dik@zuring.UUCP (Dik T. Winter) Organization: CWI, Amsterdam Lines: 22 In article <752@rtech.UUCP> jas@rtech.UUCP (Jim Shankland) writes: > PARENTHESES AFFECT PRECEDENCE, NOT EVALUATION ORDER. THESE ARE 2 DIFFERENT > THINGS. To put it another way, parentheses affect the shape of the parse > tree for an expression; evaluation order is an order in which the parse > tree is walked. I may be dense, but I do not understand. If I write a + (b + c) the parenthesis are just there to affect precedence, the second + has now higher precedence than the first. Evaluation order is something different, I do not mind whether you evaluate a before b or c, or the other way round. (This silly remark has been put up a number of times. Parenthesis ought to affect precedence, but I want an effect on precedence if I write a + (b + c), just as I want it if I write a * (b + c). However, the C language should not provide it because of all those parenthesis coming up from macros. Unless of course, the ANSI C-committee decides that parenthesis from macros are different from normal parenthesis. {which of course is true, unless your macro ....}) I look, I used parenthesis and braces! -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax