Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!seismo!mcvax!botter!tjalk!rblieva From: rblieva@cs.vu.nl (Roemer b Lievaart) Newsgroups: comp.lang.c Subject: Re: Weird C code as test for employment Message-ID: <860@tjalk.cs.vu.nl> Date: Tue, 11-Aug-87 13:05:05 EDT Article-I.D.: tjalk.860 Posted: Tue Aug 11 13:05:05 1987 Date-Received: Thu, 13-Aug-87 03:20:47 EDT References: <8634@brl-adm.ARPA> <7881@mimsy.UUCP> <6239@brl-smoke.ARPA> <183@xyzzy.UUCP> <6253@brl-smoke.ARPA> Reply-To: rblieva@cs.vu.nl (Roemer B. Lievaart) Organization: VU Informatica, Amsterdam Lines: 21 In article <6253@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >What I originally thought might be wrong is that in the process of >expanding the expression *--*++cpp at one point one is trying to >evaluate --(cp+2) (or something like that), and it was not (and still >is not) clear to me that (cp+2) qualifies as a modifiable lvalue. No, you are not evaluating --(cp+2). Why not? Well: { int a ; a = 2 ; ++a ; .... is completely correct, isn't it? But "you"'re not evaluating ++2 or something, but ++a. ++a means a = a + 1 , not 2 = 2 + 1. So the same goes for: if *x == y ++*x does not mean ++y. That's all there is to it. Roemer. "Never thought it would go so fast: BASIC and Pascal already belong to the dead languages" ( v. Kooten & de Bie )