Top "Return" questions

A return statement causes execution to leave the current subroutine and resume at the point in the code immediately after where the subroutine was called, known as its return address.

Using Spring's mockMvc, how do I check if the returned data contains part of a string?

I’m using Spring 3.2.11.RELEASE and JUnit 4.11. Using the Spring mockMvc framework, how do I check if a method returning …

json spring junit return mockmvc
How to return array from C++ function to Python using ctypes

I am using ctypes to implement a C++ function in Python. The C++ function should return a pointer to an …

c++ python arrays return ctypes
Why default return value of main is 0 and not EXIT_SUCCESS?

The ISO 1998 c++ standard specifies that not explicitly using a return statement in the main is equivalent to use return 0. …

c++ return standards main
How to return value from table's DataSource to main report in iReport?

I have a table in my iReport which naturally has its dataset and I have a variable, that is defined …

return jasper-reports ireport
Turn off “unreachable code after return statement” warning

In JavaScript development, I frequently return from execution to have an inartificial breakpoint: var args = arguments; return console.log(args); // …

firefox return gecko web-console
jQuery/JavaScript: Detecting scroll direction - code structure issue

I need to detect the direction in that a user scrolls - "up" or "down". Based on the code found …

javascript jquery scroll return code-structure
try-catch-finally with return after it

I know how try, catch & finally work (for most part), but I have one thing I was wondering: what …

java return try-catch try-catch-finally finally
Is the behavior of return x++; defined?

If I have for example a class with instance method and variables class Foo { ... int x; int bar() { return x++; } }; …

c++ return post-increment
PayPal auto return does not send back any POST data

I have a similar problem to this post Setting PayPal return URL and making it auto return? However, the solution …

php paypal return paypal-ipn
Returning a string [char pointer] from a function

I am writing a program that returns a string from stdin, but i am getting warning that it returns an …

c string return fgetc