Plenty of two cents here I know, but mine are:
I only return a status variable when using Dynamic Memory Allocation, when accessing files, or any other time when errors may be beyond the control of the coder.
I return an integer, 1 or 0. This works the same as BOOL and looks prettier to me (I like pretty things
I think the advantage is small, in that your error checking code is shorter, i.e.
The latter is easier to read although it makes more 'if' nests in the function/ procedure itself.Code:if(!MyFunction()) { // do error handling ... // as opposed to int success; MyFunction(success); if(!success) { // do error handling ...
I guess it really is just preference.
dt