From: utzoo!decvax!harpo!seismo!hao!hplabs!sri-unix!mike@Rand-Unix Newsgroups: net.unix-wizards Title: Re: Returning structures Article-I.D.: sri-unix.4983 Posted: Thu Dec 30 13:46:16 1982 Received: Sat Jan 1 01:50:20 1983 Date: Tuesday, 28 Dec 1982 12:38-PST Why would anyone want to return a structure from a function? Because some functions that operate on non-primitive data types (ie, structures and typedefs) need to return such a structure to the caller. Passing the structure itself instead of an address makes it easier to write recursive code. An example is a graphics system we are developing where a function returns a color and a color is defined by the components red, green blue and matte. Michael Wahrman