RE: return two values at once from C function?
RE: return two values at once from C function?
- Subject: RE: return two values at once from C function?
- From: email@hidden
- Date: Fri, 29 Aug 2003 16:20:21 +0100
Why not pass a pointer to the integer for data retunr in the parameter list
of the function and use the return code for the function to indicate success
or error?
Alun Carp
Driver Development Team Leader
Data Encryption Systems Limited
-----Original Message-----
From: David Thorp [
mailto:email@hidden]
Sent: 29 August 2003 15:42
To: email@hidden
Subject: return two values at once from C function?
Greetings again,
I'm now wondering if I SHOULD make the function in my previous email
handle the errors. The problem is...
I've probably missed something really obvious, but I'm trying to figure
out if there's any way to return more than one value from a function.
In particular this is relevant when I'm trying to return an error code
along with another integer or something.
What if say, I have a function that returns an integer, but if there's
an error, the function says to return null. Does that actually make
any sense? Or is that breaking something, or whatever?
Any thoughts on this matter would be most appreciated.
Cheers!
David.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.