CHECK outside of loop (CHECK 02) should be more smart
alezhu opened this issue · 1 comments
alezhu commented
CHECK 02 does not allow CHECK for exit from block except loops. It required RETURN for this.
And it used Programming Guideline Only use RETURN to exit procedures) to justify it.
BUT! That guideline has Exception section:
An exception to the rule to only use RETURN to exit procedures are CHECK statements that are located at the beginning of a procedure and that check the prerequisites for the execution of the procedure there. Using the CHECK statement in such a way does not impair the legibility and is thus allowed. However, this exception does not apply to other positions within a procedure and outside loops.
larshp commented
thanks, pull requests welcome