subroutine

Callable code block

A subroutine is a sequence of instructions within a computer program that performs a specific task, packaged as a unit that can be called from elsewhere in the code.

The term emphasizes reusability—write the routine once, use it many times.

Also called a function, procedure, or method depending on the programming language: The subroutine handles all the error checking.

programming

function

Purpose or duty

parameter · argument · return · module · subprogram · block · execution · loop · iteration · variable

assembly

instruction

Guidance for action

call · return · stack · assembler · machine-code · BIOS · microcode · operand · linker · low-level

modular

component

Element of a system

block · element · modularity · encapsulation · interchangeable · plug-and-play · integration · composite · structure · configurable

routine

procedure

Prescribed sequence of actions

protocol · standardization · automation · scheduling · batch · systematic · workflow · task · process · script

Categories
Opposites
program hierarchy

subroutinemain function

Chief operational role

entry point · caller · kernel · supervisor · operating system

code modularity

subroutineinline code

spaghetti code · script

Family

subroutines

Familiarity
Top 500,000
Profile
Used worldwide · Timeless · Abstract · Rated G