Re^2: `interesting' program

Maarten Litmaath maart at cs.vu.nl
Wed Jul 12 05:26:54 AEST 1989


shankar at 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 at cs.vu.nl, mcvax!botter!maart



More information about the Comp.lang.c mailing list