Subprogram
Part of speech: noun
Definitions
- A distinct segment of code that executes a designated function while functioning as part of a larger program architecture
- A smaller, specialized code unit designed to perform a particular task within the broader context of a primary program
- A defined block of instructions that carries out a specified task inside a bigger software application
Etymology: A subprogram is about as plain as compounds get: the prefix "sub-", from Latin "sub" meaning "under" or "below," attached to "program." The prefix traces back through Proto-Italic to the older Proto-Indo-European root "upó," which carried the same sense of position beneath something. English took "sub-" as a productive prefix that it applies freely to existing words, so "subprogram" needed no special coinage; it simply describes a program placed beneath a larger one. The base word has a more notable path. "Program" came into English from Latin "programma," a public notice or written announcement, which Greek had borrowed from "prographein," meaning "to write before" or "to publish." The sense of an ordered sequence of events, and later of a sequence of instructions, developed far from that original posting on a wall. In computing, "program" took on its modern meaning of a set of instructions for a machine, and "subprogram" follows that usage, naming a self-contained block of instructions that a main program calls to perform one task.
Synonyms: module, subroutine