is f().c legal? How about (&(f()))->c ?

Tom Middleton middleto at sdsu.UUCP
Thu Feb 2 17:10:06 AEST 1989


In article <2648 at vedge.UUCP> lai at vedge.UUCP (David Lai) writes:
>Here f() returns a structure.

I may be missing the point here but it seems that one problem is f()
does not return a structure but rather a pointer to a structure.  I
don't know how an entire structure can be returned by a function.
This would imply that f()->c should be legal, but I don't know if
that is what you meant to say in the first place.  Seems to me that
&(f()) is the address of the pointer returned by the function f and
although (&(f()))-> is legal it isn't what you think it is.

-- 
 G O    P A D R E S !		Thomas Earl Middleton
    1989			aka Happy Bare
 N L    C H A M P S !		UUCP  ...!ucsd!sdsu!middleto
 W S    C H A M P S !		ARPA  middleto%sdsu.uucp at ucsd.edu



More information about the Comp.std.c mailing list