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.

Go: returning from defer

I want to return an error from a function if it panics (in Go): func getReport(filename string) (rep report, …

go return deferred panic
Java: Ternary with no return. (For method calling)

I was wondering if it was possible to do a ternary operation but without returning anything. If it's not possible …

java methods boolean return ternary
Getting a return value or exception from AspectJ?

I am able to get the signature and arguments from advised method calls, but I cannot figure out how to …

exception return aspectj pointcut
What does "return {}" statement mean in C++11?

What does the statement return {}; in C++11 indicate, and when to use it instead of (say) return NULL; or return …

c++ c++11 return return-value list-initialization
How to return a value and raise an Exception

I have two objectives with this try/except statement. It needs to return a value of 1 if no problems occurred, …

python exception exception-handling return systemexit
Enumerable.Empty<T>() equivalent for IQueryable

When a method returns IEnumerable<T> and I do not have anything to return, we can use Enumerable.…

c# return iqueryable
MS Access Form - Enter key not moving to new line

I have an odd issue with a form I have in MS Access. For some reason, when I hit the "…

forms ms-access return carriage-return
What does "return $this" mean?

I'm trying to understand this code, and when I arrived at the final line, I didn't get it. :( Can I …

php oop zend-framework return
How to return a value with Dispatcher.Invoke?

Anyone knows how to return a value from Dispatcher.Invoke in wpf? I want to return the selected index for …

wpf return invoke dispatcher
Avoiding copy of objects with the "return" statement

I have a very basic question in C++. How to avoid copy when returning an object ? Here is an example : …

c++ object copy return return-value