I want a function to return multiple values after doing data processing i.e. void test(int a, int b int c) whereas a, b and c have values set and control is returned to the caller with the values sent back. Try as I may I haven't been able to return values from my function, furthermore I read from someone C doesn't support multiple returns - is this correct??
It seems such a stupid limitation when (supposedly) inferior programming languages like Pascal can support multiple returns in a function / procedure call.
What gives??
Is this just in Keil?? Can I get it to do what I want??
I really want to avoid using global declarations, records or structs if at all possible.
"I read from someone C doesn't support multiple returns"
"Someone" being none other than Messrs Kernighan & Ritchie - the authors of the language?
"is this correct?"
Yes. Any decent textbook should be clear on this.
"Is this just in Keil?"
No.
"I really want to avoid using ... structs if at all possible."
Why? That would be the usual way to do it.
Or pass the parameters by reference (pointer)?
Even farmers do these days.
Old Mac Donald. EI, EIO.
It seemed appropriate in the context, I'll put it back in my pants now.
www.youtube.com/watch