Hi all, Quick question: What is the best way to have multiple return values from a function? Would that be placing these into a structure and returning that to the caller? Thanks. -bw -- || "If wishes and buts were clusters of nuts, we'd all have a bowl of || granola!" - Mr. Jellineck
On Mon, 26 Apr 2004, Bill Wendling wrote:> Quick question: What is the best way to have multiple return values from > a function? Would that be placing these into a structure and returning > that to the caller?Yup, that's what the C front-end currently does. It transforms functions like this: Struct foo() into: void foo(Struct *S) And foo fills in the indicated structure. -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/