Top "Return-value" questions

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

How to call an external program in python and retrieve the output and return code?

How can I call an external program with a python script and retrieve the output and return code?

python return-value external-process
Is it good style to explicitly return in Ruby?

Coming from a Python background, where there is always a "right way to do it" (a "Pythonic" way) when it …

ruby coding-style return-value
How can I index a MATLAB array returned by a function without first assigning it to a local variable?

For example, if I want to read the middle value from magic(5), I can do so like this: M = magic(5); …

matlab indexing matrix return-value variable-assignment
Pass a return value back through an EventHandler

Im trying to write to an API and I need to call an eventhandler when I get data from a …

c# return-value event-handling
How to make a function return a pointer to a function? (C++)

I'm trying to make a function that takes a character, then returns a pointer to a function depending on what …

c++ return-value function-pointers
How do I set $? or the return code in Bash?

I want to set a return value once so it goes into the while loop: #!/bin/bash while [ $? -eq 1 ] do #…

bash error-handling return-value exit-code
What if I write return statement in constructor?

What if I write return statement in constructor? Is it standard conformant? struct A { A() { return; } }; The above code compiles …

c++ constructor return-value return return-type
Run MsiExec from PowerShell and get Return Code

With BAT/CMD script I can simply use "msiexec /i <whatever.msi> /quiet /norestart" and then check %errorlevel% …

powershell return-value exit-code windows-installer
Is there a benefit to using a return statement that returns nothing?

I'm refactoring a large javascript document that I picked up from an open source project. A number of functions use …

javascript refactoring return-value