Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: return(struct) implementation Message-ID: <1989Mar13.164106.22020@utzoo.uucp> Organization: U of Toronto Zoology References: <4425@pt.cs.cmu.edu> <1989Mar7.163952.20063@utzoo.uucp> <42110@clyde.ATT.COM> Date: Mon, 13 Mar 89 16:41:06 GMT In article <42110@clyde.ATT.COM> feg@clyde.ATT.COM (Forrest Gehrke) writes: >> Just about every permutation of putting it on the stack is probably >> in use in some compiler or other. Probably the best approach, although >> it's one that requires correct declaration, is to have the caller pass >> in a pointer (as an invisible extra parameter) to where he wants the >> return value put... > >I don't understand how a programmer calls a function and passes >an "invisible extra parameter". What device does he use to >accomplish this? .....Or, are you talking about the compiler >programmer? The programmer has no say in the matter, any more than he has a say in how a returned struct is put on the stack in an implementation that uses the stack. This is entirely the compiler's job. -- Welcome to Mars! Your | Henry Spencer at U of Toronto Zoology passport and visa, comrade? | uunet!attcan!utzoo!henry henry@zoo.toronto.edu