[comp.lang.c] Re^2: `interesting' program

maart@cs.vu.nl (Maarten Litmaath) (07/12/89)

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