on 3/23/07 3:45 PM, Guyren Howe at [EMAIL PROTECTED] wrote: > On Mar 23, 2007, at 2:12 PM, C. S. Wyatt wrote: > >> Functions should return one value. > > Every reply to my post so far has said this. Not one of them has said > why. > > So go on: why? I've provided some arguments in favor (for example: > clearer than ByRef argument. When you pass a ByRef variable, there's > nothing to show that it's going to get modified, but an lvalue is > clearly being modified). This would also be very valuable in calling > Events (cf ListBox.CompareRows event -- when you're writing the > super's end of that, it's rather fiddlier). Also, all the languages > mentioned seem to find this a useful feature. > > "It makes me uncomfortable" is not a good answer. :-)
I agree that being able to return multiple values would be useful. I'm not sure I like how you've proposed it. Coming from a C++ background the classic solution is to return a tuple or a result object. This keeps the return syntax the same. I didn't see in your FR how you would return the multiple values or how you would assign them at the point of calling. Could you provide an example of what you have in mind? Chris _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
