Go Down

Topic: useless return (Read 456 times) previous topic - next topic


So take for example function badge() that is between void setup() and void loop()
So what you mean is that return leaves the current function without executing the remaining code and then ?
Does it execute the function badge() again or does it execute the next function like void loop() ?
return returns to where the current function was called from, always.  A function declared as return-type void has an iimplicit "return" at the end, assuming the end is reachable.

Functions with a non-void return-type must have explicit return statements with a value to pass back (unless
they never return).
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Go Up