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.

How do I return multiple values from a function?

The canonical way to return multiple values in languages that support it is often tupling. Option: Using a tuple Consider …

python coding-style return return-value
Return multiple values in JavaScript?

I am trying to return two values in JavaScript. Is this possible? var newCodes = function() { var dCodes = fg.codecsCodes.rs; …

javascript return multiple-variable-return
How to return a result from a VBA function

How do I return a result from a function? For example: Public Function test() As Integer return 1 End Function This …

excel vba function return return-value
Return array in a function

I have an array int arr[5] that is passed to a function fillarr(int arr[]): int fillarr(int arr[]) { for(...); …

c++ arrays pointers function return
Return multiple values to a method caller

I read the C++ version of this question but didn't really understand it. Can someone please explain clearly if it …

c# return
What is the purpose of the return statement?

What is the simple basic explanation of what the return statement is, how to use it in Python? And what …

python printing return
Does a finally block always get executed in Java?

Considering this code, can I be absolutely sure that the finally block always executes, no matter what something() is? try { …

java error-handling return try-catch-finally
Difference between return and exit in Bash functions

What is the difference between the return and exit statement in Bash functions with respect to exit codes?

bash function return-value return exit
How can I return two values from a function in Python?

I would like to return two values from a function in two separate variables. For example: def select_choice(): loop = 1 …

python list function return return-value
What is the best way to exit a function (which has no return value) in python before the function ends (e.g. a check fails)?

Let's assume an iteration in which we call a function without a return value. The way I think my program …

python function return