Subroutines

Part of speech: noun

Definitions

  1. A sequence of programmed instructions executed to perform a specific task within a larger application
  2. A defined block of code that can be called multiple times from different points in a program, allowing for modular programming
  3. A reusable segment of code that processes input and returns output, enhancing software organization and reducing redundancy

Etymology: The root of "routine" is a broken road. It comes from French "route," which descends from Latin "via rupta," literally "broken way," a track cut through rough ground. Repeatedly travelling the same path gave the French noun its sense of a habitual course of action, and English later used "routine" for any fixed way of doing things. The "sub-" prefix comes from Latin "sub," meaning "under" or "below." A subroutine is therefore a routine placed beneath a main program. It is a self-contained set of instructions that the main program can call whenever it needs that task, so the same code does not have to be written out again at each point where it is used.

Synonyms: procedures, functions