I have something like this.
void function(void) { if (a) { if (b) { // do something 1 } else { // do something 2 } } if (c) { if (d) { // do something 3 } else { // do something 4 } } if (e) { if (f) { // do something 5 } else { // do something 6 } } }
The problem is if "something 1" is already executed, I want to exit the function. I don't need to check the succeeding ifs. The same goes for all the odd-numbered somethings.
I am thinking of putting return(0)'s there but that would make my function non-void. And i don't really need it to return anything.
Can i call a non-void function without equating it to anything?
e.g.
uint8_t function(void);
function();
and not
foo = function();