Top "Return-value" questions

Return value is the result of evaluation of a return statement.

Returning tuple with a single item from a function

Just came across this little bit of weirdness in Python and thought I'd document it write it as a question …

python function return-value iterable-unpacking
RSpec Stubbing: Return the parameter

Though my question is pretty straightforward, I failed to find an answer around here: How can I stub a method …

ruby parameters rspec return-value stubbing
Return Type of Java Generic Methods

I wonder why generic methods which return nothing void are (or can be) declared this way: public static <E&…

java generics methods return-value enumeration
window.opener.returnValue in Chrome with showModalDialog

I am trying to use window.opener.returnValue with showModalDialog. There are numerous references to a technique which can be …

javascript return-value showmodaldialog
Return map like 'ok' in Golang on normal functions

In Go, the following works (note one use of the map has one return, the other has two returns) package …

go return-value multiple-return-values
C#: Returning 'this' for method nesting?

I have a class that I have to call one or two methods a lot of times after each other. …

c# methods return-value fluent-interface
Recursive power function: Why does this work if there's no initial return value?

because power(base, exponent) has no return value unless exponent is 0, initially, shouldn't power(base, exponent -1) return 'undefined', and …

javascript recursion logic return-value exponential
C++ get method - returning by value or by reference

I've go a very simple question, but unfortunately I can't figure the answer myself. Suppose I've got some data structure …

c++ reference return-value return-value-optimization
Execute Multiple SQL Statements In Stored Procedure With Single Result Return

I am looking to return a single set of data from my stored proceedure, but the result are returning just …

sql-server tsql stored-procedures return-value multiple-select-query
Returns in a recursive function

I am trying to understand how to use recursion in C, and I can't get how return works in it. …

c recursion return-value function-definition