what does IN mean when declaring variables?
-
I'm new to programming and am having trouble figuring out what the following syntax means when defining a function and it's arguments: VOID myFunc( IN PCHAR stuff, OUT BOOLEAN test ); What is the purpose of IN, OUT? What is this called? I haven't been able to find a good explanation because these are such common words, and I'm not sure what this syntax is called. Thank you.
-
I'm new to programming and am having trouble figuring out what the following syntax means when defining a function and it's arguments: VOID myFunc( IN PCHAR stuff, OUT BOOLEAN test ); What is the purpose of IN, OUT? What is this called? I haven't been able to find a good explanation because these are such common words, and I'm not sure what this syntax is called. Thank you.
IN means that is something your passing to the function. OUT is something that will return from the function. Laymans terms Tom Wright tawright915@yahoo.com
-
IN means that is something your passing to the function. OUT is something that will return from the function. Laymans terms Tom Wright tawright915@yahoo.com
-
I'm new to programming and am having trouble figuring out what the following syntax means when defining a function and it's arguments: VOID myFunc( IN PCHAR stuff, OUT BOOLEAN test ); What is the purpose of IN, OUT? What is this called? I haven't been able to find a good explanation because these are such common words, and I'm not sure what this syntax is called. Thank you.
scottwalk wrote: What is the purpose of IN, OUT? Basically it indicates when the variables will contain valid information. IN indicates that the variable has valid information when calling the function; OUT indicates that the variable will have valid information after the called function returns. See "pass by reference" and "pass by value" for related information.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
Sweet. Thanks. ..so, let's pretend for a minute that I'm not a layman(which I am). What are the gory details?
No gory details....sometimes developers here speak over new developers heads. It's kinda like they want to break everything down to the Greek language (kinda like a preacher in a pulpit)(Sometimes it's easier in english than when you break it down to something else). Which is nice, but sometimes you have to tell it in easier terms and then when that person understands explain why (in Greek :) ) Tom Wright tawright915@yahoo.com
-
scottwalk wrote: What is the purpose of IN, OUT? Basically it indicates when the variables will contain valid information. IN indicates that the variable has valid information when calling the function; OUT indicates that the variable will have valid information after the called function returns. See "pass by reference" and "pass by value" for related information.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow