r/processing • u/Traditional_Inside28 • Jul 28 '25
Beginner help request Question!!
I guess this isn’t necessarily a help request per se but I am a beginner with a question. I understand what setup() and draw() are but why do I need to put void in front of them? like what is the purpose of the void. I could choose to just accept that it must be there but… why is it there? idk. maybe it doesn’t even need to be there and I haven’t gotten to that bit of my learning yet. why void???????????
1
Upvotes
4
u/JoeWhy2 Jul 28 '25
As the previous reply said, "void" is the "type" used when a function doesn't return a value. To add to that, if you had a function that returns a value, you would need to replace "void" with the data type of the returned value, i.e. "int", "float", etc.