tagged [return-value]
How can I return two values from a function in Python?
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 row = 0 while l...
- Modified
- 19 Aug at 17:43
Get return value from stored procedure
Get return value from stored procedure I'm using Entity Framework 5 with the Code First approach. I need to read the return value from a stored procedure; I am already reading output parameters and se...
- Modified
- 21 Jun at 07:4
Should functions return null or an empty object?
Should functions return null or an empty object? What is the when returning data from functions. Is it better to return a Null or an empty object? And why should one do one over the other? Consider th...
- Modified
- 29 Jul at 17:27
Calling a non-void function without using its return value. What actually happens?
Calling a non-void function without using its return value. What actually happens? So, I found a similar question [here](https://stackoverflow.com/questions/1231287/general-programming-calling-a-non-v...
- Modified
- 23 May at 12:17
Pass a return value back through an EventHandler
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 table. Something like this: ``` public override bool Run(Company...
- Modified
- 18 Sep at 18:43
Best way to return a value from a python script
Best way to return a value from a python script I wrote a script in python that takes a few files, runs a few tests and counts the number of total_bugs while writing new files with information for eac...
- Modified
- 14 Aug at 12:11
Return value from SQL Server Insert command using c#
Return value from SQL Server Insert command using c# Using C# in Visual Studio, I'm inserting a row into a table like this: I want to do something like this, but I don't know the correct syntax: This ...
- Modified
- 17 Feb at 06:13
Does C# support multiple return values?
Does C# support multiple return values? This is a very basic question, and if what I am thinking of doing is complicated/involved, then I don't expect you to go into detail... I've read that this may ...
- Modified
- 15 Jan at 08:56
How to indicate that a method was unsuccessful
How to indicate that a method was unsuccessful I have several similar methods, say eg. CalculatePoint(...) and CalculateListOfPoints(...). Occasionally, they may not succeed, and need to indicate this...
- Modified
- 2 Oct at 11:39
How to assign from a function which returns more than one value?
How to assign from a function which returns more than one value? Still trying to get into the R logic... what is the "best" way to unpack (on LHS) the results from a function returning multiple values...
- Modified
- 30 Oct at 00:33
Return multiple values from a C# asynchronous method
Return multiple values from a C# asynchronous method I have worked with asynchronous methods and the methods which return multiple values, separately. In this specific situation, following "GetTaskTyp...
- Modified
- 29 Nov at 21:50
Languages that allow named tuples
Languages that allow named tuples I was wondering if there are any languages that allow for named tuples. Ie: an object with multiple variables of different type and configurable name. E.g.: ``` publi...
- Modified
- 7 Mar at 15:58
return empty List in catch block
return empty List in catch block I have a c# function that reads file locations from a Datatable, and returns a List with all the file lcoations to the calling method. In the `Catch` block, I want to ...
- Modified
- 11 Apr at 09:1
Calling stored procedure with return value
Calling stored procedure with return value I am trying to call a stored procedure from my C# windows application. The stored procedure is running on a local instance of SQL Server 2008. I am able to c...
- Modified
- 21 Nov at 04:22
Is it OK not to handle returned value of a C# method? What is good practice in this example?
Is it OK not to handle returned value of a C# method? What is good practice in this example? Out of curiosity...what happens when we call a method that returns some value but we don't handle/use it? A...
- Modified
- 30 Jul at 18:32
How to indicate when purposely ignoring a return value
How to indicate when purposely ignoring a return value In some situations using C/C++, I can syntactically indicate to the compiler that a return value is purposely ignored: ``` int SomeOperation() { ...
- Modified
- 29 Aug at 14:19
What values to return for S_OK or E_FAIL from c# .net code?
What values to return for S_OK or E_FAIL from c# .net code? I'm implementing a COM interface that should return int values either `S_OK` or `E_FAIL`. I'm ok returning `S_OK` as I get that back from an...
- Modified
- 18 Nov at 15:27
C#: Returning 'this' for method nesting?
C#: Returning 'this' for method nesting? I have a class that I have to call one or two methods a lot of times after each other. The methods currently return `void`. I was thinking, would it be better ...
- Modified
- 23 Apr at 13:30
Alternatives for returning multiple values from a Python function
Alternatives for returning multiple values from a Python function The canonical way to return multiple values in languages that support it is often [tupling](https://stackoverflow.com/questions/38508/...
- Modified
- 10 Aug at 18:56