subroutines
Reusable code blocks
Subroutines is the plural of subroutine, a sequence of instructions within a computer program that performs a specific task.
Subroutines can be called from multiple points in a program, avoiding repetition: The code was organized into subroutines for readability.
Also called functions, procedures, or methods depending on the programming language.
Works or serves purposes
- proceduresSet methods for tasks
- methodsWays to accomplish something
- callsContacts by telephone
- parametersDefined boundaries or constraints
arguments · recursion · iteration · invocation · implementation · nesting · scope · execution
Fit for repeated service
- modularMade of separable units
- componentsConstituent parts
- modulesSelf-contained system components
- blocksObstructs or sections
units · segments · encapsulation · abstraction · libraries · APIs · packages · snippets
Prescribed sequence of actions
header · body · signature · declaration · definition · naming · documentation · inline
Marked by recurrence
- automatedOperating without human control
- systematicFollowing ordered procedures
- standardLevel of quality accepted
- establishedFormally set up
procedural · sequential · mechanical · predictable · consistent · regular · methodical · structured
functions
Works or serves purposes
- proceduresSet methods for tasks
- methodsWays to accomplish something
- callsContacts by telephone
parameters · arguments · recursion · iteration · invocation · implementation · nesting · scope · execution · debugging
reusable
Fit for repeated service
- modularMade of separable units
- componentsConstituent parts
- modulesSelf-contained system components
blocks · units · segments · encapsulation · abstraction · libraries · APIs · packages · snippets · templates
procedure
Prescribed sequence of actions
return · header · body · signature · declaration · definition · naming · documentation · inline · nested
repetitive
Marked by recurrence
- automatedOperating without human control
- systematicFollowing ordered procedures
- standardLevel of quality accepted
established · procedural · sequential · mechanical · predictable · consistent · regular · methodical · structured · orderly
- automationautomation, macros, macro, automate, hotkeys
- PLCsPLC, rung, rungs, coil, coils
- programmingvariables, functions, for, function, debugger
- BASIC programmingGOTO, REM, variables, line numbers, loops
- evolutionary algorithmsgenetic algorithm, crossover, mutation, selection, population
- Perlmy, use, sub, print, if