Several people have said that a subroutine should "do one thing." In that spirit, there is a simple test for whether or not a block of code should be a subroutine. If the code can be completely described in one sentence with no 'and', 'or' or 'but', it probably should be a subroutine.
Note: This is not an original idea. It is paraphrased from Yordon and Constantine's 1979 book "Structured Design"
UPDATE: Corrected Reference.
In reply to Re: efficient use of subroutines
by BillKSmith
in thread efficient use of subroutines
by jeri_rl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |