in reply to Thoughts on using subroutines to clean up code?
An example or two would be very helpful here. This is an opinion-type question, and there are going to be varying opinions on how someone would approach this depending on what the actual situation is.
Subroutines should perform a specific task, so if the edge case issue is related to one of those specific pieces of functionality, add the checks in the appropriate sub. It helps if you can keep your subs short enough to not extend past a full screenful of text.
|
---|