subprograms
Nested callable units
Subprograms are self-contained sections of code within a larger program, designed to perform specific tasks.
Functions and subroutines are the main types.
A subprogram can be called repeatedly from different points in the main program, avoiding redundant code: The subprogram handles all the error checking.
Breaking complex programs into subprograms makes code easier to write, test, and maintain.
Packaged callable code segment
- functionPurpose or duty
- procedurePrescribed sequence of actions
- moduleIndependent functional component
- routineRegular sequence of actions
method · call · return · parameter · argument · variable · loop · conditional
Program execution duration
- invokeCall upon formally
- returnGo back again
- branchingSplitting into separate directions
- sequencingDetermining element order
termination · exit · jump · goto · interrupt · thread · process · allocation
Element of a system
- unitIndividual part or measure
- blockSolid mass, or impede
- segmentDistinct part of whole
- partitionBarrier separating spaces
encapsulation · reusable · plug-in · interface · abstraction · decoupling · hierarchy · structured
subroutine
Packaged callable code segment
- functionPurpose or duty
- procedurePrescribed sequence of actions
- moduleIndependent functional component
routine · method · call · return · parameter · argument · variable · loop · conditional · recursion
runtime
Program execution duration
sequencing · termination · exit · jump · goto · interrupt · thread · process · allocation · registers
component
Element of a system
partition · encapsulation · reusable · plug-in · interface · abstraction · decoupling · hierarchy · structured · interchangeable