Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.std.c Subject: Re: nonportable code or incorrect compilers? Message-ID: <8244@brl-smoke.ARPA> Date: 28 Jul 88 19:58:38 GMT References: <133@daitc.ARPA> <430@uwovax.uwo.ca> <374@accelerator.eng.ohio-state.edu> <8228@brl-smoke.ARPA> <376@accelerator.eng.ohio-state.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 20 In article <376@accelerator.eng.ohio-state.edu> rob@kaa.eng.ohio-state.edu (Rob Carriere) writes: >However, the conversion rule says that a is to be >converted to double; this seems to contradict the idea that a is to be >computed *once*. That's not the rule. a op= b (where a and b are expressions) is equivalent to a = a op b EXCEPT that the expression a is EVALUATED only once. I.e. if evaluation of the expression a has side-effects, they will occur only once. Once the expression is evaluated, it is used in the context a = a op b and other stuff happens at that point.