I'd like to call a number of functions, all which can only be called if the previous function succeeded. All functions return bool results, so just wondering what the best way to do this would be.
I'm currently using the following method:
but wondering if this would be better:Code:if (func_a()) if (func_b()) if (func_c()) (etc...)
Problem is, would they all be called regardless of whether the previous one failed, or would execution stop when one of them returned FALSE? Or worse still, is the above unspecified, and depends on compiler?Code:if (func_a() && func_b() && func_c())