Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ukma.UUCP Path: utzoo!watmath!clyde!cbosgd!hasmed!qusavx!ukma!david From: david@ukma.UUCP (David Herron, NPR Lover) Newsgroups: net.lang.c Subject: Re: YAAO (yet another assignment operator) Message-ID: <452@ukma.UUCP> Date: Mon, 31-Dec-84 13:23:02 EST Article-I.D.: ukma.452 Posted: Mon Dec 31 13:23:02 1984 Date-Received: Wed, 2-Jan-85 03:46:27 EST Organization: Univ. of KY Mathematical Sciences Lines: 24 > I shudder to suggest this, but if you want that effect, how about: > > register float *y; > ... > *(y=&a[...]) = func( *y ); > > David sde@mitre-bedford Good thing you shudder to suggest that. Won't work with the 4.2 vax compiler. The 4.2 compiler evaluates any function calls in an expression BEFORE anything else. This is so the code will work. (Don't remember the exact reason but recall that it had to do with the saving of r0 and r1 correctly). So (in your code) func will be called with the contents of whatever random place y points at.....possibly resulting in a hard to find bug. Now, if you want it all in one line of code: y=&a[...], *y = func( *y ); (Ain't C fun?) David Herron