Top "Return-value" questions

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

g++ How to get warning on ignoring function return value

lint produces some warning like: foo.c XXX Warning 534: Ignoring return value of function bar() From the lint manual 534 Ignoring …

c++ gcc g++ return-value compiler-warnings
Returning Chrome storage API value without function

For the past two days I have been working with chrome asynchronous storage. It works "fine" if you have a …

javascript function google-chrome-extension return-value google-chrome-storage
Why return a negative errno? (e.g. return -EIO)

Another simple example: if (wpa_s->mlme.ssid_len == 0) return -EINVAL; Why the unary minus? Is this (usually) done …

c return-value errno
Returning None or a tuple and unpacking

I am always annoyed by this fact: $ cat foo.py def foo(flag): if flag: return (1,2) else: return None first, …

python return-value
With C TCP sockets, can 'send' return zero?

Is it ever possible for the C send function to return zero when using TCP sockets? The man page just …

c sockets tcp return-value send
Find maximum and minimum value of a matrix

I have this code wrote in python 3: matrix = [] loop = True while loop: line = input() if not line: loop = False values = …

python-3.x matrix max return-value min
How to assign the result of the previous expression to a variable?

Suppose I'm using R's interactive console, and I've just done something like this: long_running_command() That long-running command returns …

r return-value interactive built-in
Why the 1 at the end of each perl package?

If you forget the 1 at the end of a package, Perl tells you "The package didn't return a true value". …

perl return-value perl-module
What's the difference between `return;` and no return?

Is there a difference between: function someMethod( $someArg ) { // some code return; } and function someMethod( $someArg ) { // some code // no return } Both …

php function methods return-value
Omit return type in C++11

I've recently found myself using the following macro with gcc 4.5 in C++11 mode: #define RETURN(x) -> decltype(x) { …

c++ c++11 return-value