Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.lang.c Subject: Re^2: `interesting' program Message-ID: <2861@kappl.cs.vu.nl> Date: 11 Jul 89 19:26:54 GMT References: <2833@solo8.cs.vu.nl> <660042@hpclscu.HP.COM> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 21 shankar@hpclscu.HP.COM (Shankar Unni) writes: \... \> I say: zork() is a constant of type struct foo, so you cannot take its \> address and it isn't an lvalue. \... \zork() is not exactly a "constant", but it is an expression of type struct \foo. However, it is *not* an lvalue so you cannot take its address. What I intended to say: a function return value behaves as a constant; once the value is known, you cannot suddenly decide to change it, it isn't (a) variable, so it's meaningless to take its address. \... \ (i ? func1() : func2()).mids; Shorter: (i ? func1 : func2)().mids; -- "... a lap-top Cray-2 with builtin |Maarten Litmaath @ VU Amsterdam: cold fusion power supply" (Colin Dente) |maart@cs.vu.nl, mcvax!botter!maart