Setting Return Values in Functions

If a function ends without a return value, unpredictable and inconsistent results may occur. Also, it is difficult to debug behavior if a return code is not set.

Recommendations

To avoid unpredictable results, set a default return value at the beginning of each function.