I have some problem grasping the concept of void. I’ve looked into vvvv SDK, but I can’t extrapolate any useful logic.
It’s like it’s an abstraction founded on other abstractions that I, with all the evidence, still not (if I ever will) master: it just baffles me finding it in .fx, for example.
What does it mean? Why a function should return void? Is there a similar thing in a patch that could help me understand it better?
Could you help with some explanations, a few lines of pseudo code so that the use of void makes a clear sense - though I’m not sure that this very question makes sense -?
Please, make a noob a little less noob.
Thank you for you time.
It simply means that the function does not return a result.
Unlike void*, that means pointer to something (address in the memory to some data)
That’s for the function case :-)
Sorry to bother, but is it correct to think that a void function makes some operations inside itself and simply changes something that is going to be a part of one or more operations somewhere else (actually I should have sdk on a half of the screen and msdn on the other half to understand what is going on, but since stuff could refer to other files in sdk I’d need a second screen, after all. Or paper: yes, the good old recyclable paper)?
It’s not rocket science. I think “void” is a stupid notation because it can confuse people as the figure shows but it’s stuck from the old times.
Think of “void something()” as an action. Like appending an item to an already existing array. Or modifying an already initialized variable in a bigger scope. I don’t like the word of “function” either because mathematical functions usually return stuff, actually C# grammar is better a bit. In C# “type something()” is called function (Func<ReturnType, (ArgType)…> when you are referencing functions as data) and “void something()” is called Action (Action<(ArgTypes)>), and their collective name is Method. I hope this helped!
Thank you very much, I needed this kind of explanation, something that helps me to look at this from the correct perspective: I have not a computer science bg, so some things are just weird to me.
What made it, it’s
and I’m just happy that what I thought (a void function makes some operations inside itself and simply changes something that is going to be a part of one or more operations somewhere else) it was somewhat near to your definition.
Although I signed microdee reply as solution, please share your pov on this, as it will be nonetheless helpful.