Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Browsing all 207 articles
Browse latest View live

Relationship between return value and garbage value

What happens if the return statement does not produce a return value in a function that produces a return value in C language? Does the compiler use garbage values in this case? Is this called...

View Article


main function return 1 but debug console prompts program has exited with code 0?

Trying to learn C++ here, I was playing with the main function return value, and when the return value is 1, I still got from the debugging console saying"The program...

View Article


Does it make sense to return fundamental types by const value?

Which is better:bool MyClass::someQuery() const;const bool MyClass::someQuery() const;I've been using const bool since I'm sure I remember hearing it's "what the ints do" (for e.g. comparison...

View Article

Image may be NSFW.
Clik here to view.

Excel return Price based on invoice date

I need help with returning a product price based on its invoice date.F.e. I have a product that has been sold on 2023-11-27 for 50 Eur. There are two different pricelists: EUR and USD. Since it has...

View Article

How to get the return value from a thread?

The function foo below returns a string 'foo'. How can I get the value 'foo' which is returned from the thread's target?from threading import Threaddef foo(bar): print('hello {}'.format(bar)) return...

View Article


Does anyone know why I'm getting a segmentation fault after the returning...

I have a RPC program which implements two method: 1): int * delete_occurrences_1(char **, CLIENT *); 2): ListDir * subdirectory_list_1(char **, CLIENT *);with ListDir defined as:#include...

View Article

Finding largest value in a file and printing out value w name

I need to create a progtam that opens a file then reads the values inside the file and then prints out the name with the largest value.The file contains the following info:Juan,27Joe,16...

View Article

cannot load() returned values from string

I have this assignment from the official book about lua:Exercise 16.1: Frequently, it is useful to add some prefix to a chunk of code when loading it. (We saw an example previously in this chapter,...

View Article


What does it mean to return a value?

I'm fairly new to programming, and I'm confused about what it means exactly to return a value. At first, I thought it meant to output what value is being returned, but when I tried that in my own code,...

View Article


Echo a string inside of an echo statement?

This is probably a very simple one to be answered...I have a piece of code which I need to pull a certain piece of information.<?php echo...

View Article

How can i solve a problem by using the outcome of a function as a variable in...

I have come up with this code:lista= [5,3.2, 'Error', 44, 'Error', 35]listb= [70, 70, 20, 410,'Error', 4.9]for i in range(6): a= lista[i] b= listb[i] if a == 'Error' or b == 'Error': print(f" Case...

View Article

Return a value to one function to another [closed]

I have 2 functions in PHP and i want to return a value to one function to another. this is my functions public function save_payment_log_data($icasl_number, $exam_session) {$paylog_av =...

View Article

Is it possible to return multiple values from mysql function?

I have three tables and I want to sum all the result columns of each table and return these values from the function I define to do all the process. Is it possible to return those three float summation...

View Article


Image may be NSFW.
Clik here to view.

I need to return the value amount from two seperate sheets with the criteria...

I tried Sumifs and Index and Match. I have even reviewed several posts on this site. I am not getting the results i need. any help appreciated. In my example below If B2 & A4 in Sheet 1 match then...

View Article

If i code a function to create a key-value pair, what will the Object it...

I'm new to coding and i'm just learning some JavaScript. I'm learning about using return versus console.log and how you can use return values in other functions. Anyway, I see that you can create a...

View Article


Get value from RoomDB into Composable function from Jetpack Compose

I have looked for many solutions but I found it as a newbie verycomplex on how to solve it properly without throwing away all my backendcode.I want to get an Float value from my RoomDB into a...

View Article

Function is not running as expected [duplicate]

I am a total novice with zero background in computer coding, teaching myself how to write code. I would be so grateful if someone who actually knows what they're doing would please be able to explain...

View Article


Check if PHP function returns null or nothing

I have this code $return = $ep->$method($params); if ($return === null) { throw new Exception('Endpoint has no return value'); } return $return;Is there any way to distinguish between a method that...

View Article

window.opener.returnValue in Chrome with showModalDialog

I am trying to use window.opener.returnValue with showModalDialog. There are numerous references to a technique which can be used to workaround window.returnValue not working. However it just doesn’t...

View Article

Returning different data type depending on the data (C++)

Is there anyway to do something like this?(correct pointer datatype) returnPointer(void* ptr, int depth){ if(depth == 8) return (uint8*)ptr; else if (depth == 16) return (uint16*)ptr; else return...

View Article
Browsing all 207 articles
Browse latest View live