subroutine

/ˈsʌbruːˌtiːn/
noun
  1. A set of instructions in a computer program that performs a specific task and can be used repeatedly from different parts of the program.
    • The game's graphics subroutine handles all the animations on the screen.
    • You can call the same subroutine from multiple places in your code to avoid repeating yourself.
    • The programmer wrote a subroutine to calculate the average of a list of numbers.
What does "subroutine" mean? | whatsthatwordmean | whatsthatwordmean