Do not use continue
statements without good reason in large blocks of code as they can make it difficult to follow.
Do not use goto
, or indeed functions for non-local jumps, unless there is really no alternative. They make code very difficult to follow.
Consider using switch
statements to improve the readability of code where you have excessively long chains of if else
statements. Where the same switch
statement is duplicated throughout the code, however, this will be difficult to maintain. Consider changing your code (probably the data model) so that the switch
is not needed.