- published: 23 Sep 2014
- views: 3308
In computer science, a subroutine, also termed procedure, function, routine, method, or subprogram, is a part of source code within a larger computer program that performs a specific task and is relatively independent of the remaining code.
As the name subprogram suggests, a subroutine behaves in much the same way as a computer program that is used as one step in a larger program or another subprogram. A subroutine is often coded so that it can be started (called) several times and/or from several places during one execution of the program, including from other subroutines, and then branch back (return) to the next instruction after the call once the subroutine's task is done.
Maurice Wilkes, David Wheeler, and Stanley Gill are credited with the invention of this concept, which they termed a closed subroutine.
Subroutines are a powerful programming tool, and the syntax of many programming languages includes support for writing and using them. Judicious use of subroutines (for example, through the structured programming approach) will often substantially reduce the cost of developing and maintaining a large program, while increasing its quality and reliability. Subroutines, often collected into libraries, are an important mechanism for sharing and trading software. The discipline of object-oriented programming is based on objects and methods (which are subroutines attached to these objects or object classes).
Example of Subroutine Invocation
subroutine and parameter passing using stack
PLC JSR Jump to Subroutine
Subroutine Microprocessor 8085 NITH
Basic Subroutine in VBA
VBS1. Creating a Subroutine in VBA for Excel
Fortran Subroutines Pt 13.ogv
G-Code Subroutine Loops - An example using Mach3
Perl Tutorial 25 - Subroutines: Basics
▓ █ ►SAP ABAP Tutorial || - modularization-subroutine ░▒▓
In a moment of lucidity, you said to me: "Push this boat from shore. What I am now is past and with every passing moment I resemble myself less and less. Don't let this be living for me" In death, dignity.