a set of instructions, appearing once within a computer program but available for repeated use, for performing a specific task
See subroutine in American Heritage Dictionary 4
sub·rou·tine
noun Computer Science
A set of instructions that performs a specific task for a main routine, requiring direction back to the proper place in the main routine on completion of the task.