From: Steven Jenkins Date: 2005-05-30T00:39:43+09:00 Subject: Re: Multiple return and parallel assignement Christian Neukirchen wrote: > Steven Jenkins writes: >>Dennis Ritchie has a degree in Applied Mathematics from Harvard. Brian >>Kernighan was not one of the developers of C, although he co-authored a >>famous book with Ritchie. And C functions have been able to return >>aggregates for a long time, maybe since the beginning. They're called >>structs and unions. > > Actually, that is not true. See 6.2 of "The C Programming Language" > (1st ed): The original K&R C could not return compounds, only their > addresses (which is not allowed for "auto" values, not thread-safe for > "static" values and needs memory management for allocated values, > therefore being totally inconvenient.) Thanks for the clarification. Note that I did say "maybe since the beginning". > This feature must have been added before the 2nd edition (ANSI) was > published, though. My german version already knows about it, and that > was released in 1983. Then, I can't recall any code offhand that > directly returned a structure... The High-Order Calculator example in Kernighan and Pike (1984) has a pop() function that returns a union. This is not really on-topic any more, so let's let it go. Ritchie himself has written extensively on the history of C; anyone who's interested can find it easily. Steve