Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!iuvax!pur-ee!uiucdcs!uiucdcsb!mccaugh From: mccaugh@uiucdcsb.UUCP Newsgroups: comp.lang.c Subject: Re: structure enhancements Message-ID: <165600018@uiucdcsb> Date: Wed, 28-Oct-87 01:08:00 EST Article-I.D.: uiucdcsb.165600018 Posted: Wed Oct 28 01:08:00 1987 Date-Received: Sat, 31-Oct-87 01:54:34 EST References: <444@root44.co.uk> Lines: 13 Nf-ID: #R:root44.co.uk:444:uiucdcsb:165600018:000:796 Nf-From: uiucdcsb.cs.uiuc.edu!mccaugh Oct 28 00:08:00 1987 This may not be possible. -> is the "indirect component selector" (recall '.' is the "direct" one) and according to Harbison & Steele, page 149: "The value (of an indirect component selection expression) is the named member of the union or structure and (so) is an LVALUE." But on page 184 appears the warn- ing that "the result of an assignment expression is NEVER an lvalue." (See also page 186.) We are speaking here of "compound" assignment expressions. Thus p -> n must be an lvalue ("namely", n) while p ->= n cannot be. Again, if this is confusing, please read page 186 of H&S which admonishes that the resulting value stored in the left operand of a compound assignment (such as p -> n in p ->= n) can NOT be an lvalue, which p -> n itself definitely is. mccaugh @ uiucmsl