subroutine

noun

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.

noun

A section of code, called by the main body of a program, that implements a task. While it may be used at more than one point in a program, it need not be.

noun

a set sequence of steps, part of larger computer program