An external function or subroutine that can be invoked from another program unit to perform a specific task Contrast with main program
a sequence of programming language statements associated with a name and a set (possibly empty) of formal parameters The name can be used to request the execution of the sequence of statements with the values of some set of actual parameters, of the same number and type as the formal parameters, which are assigned to the formal parameters before execution of the subprogram body begins
A named PL/SQL construct Packages, functions, and procedures constitute subprograms
A subprogram is either a procedure or a function A procedure specifies a sequence of actions and is invoked by a procedure call statement A function specifies a sequence of actions and also returns a value called the result, and so a function call is an expression A subprogram is written as a subprogram declaration, which specifies its name, formal parameters, and (for a function) its result; and a subprogram body which specifies the sequence of actions The subprogram call specifies the actual parameters that are to be associated with the formal parameters A subprogram is one of the kinds of program unit
A function subprogram or a subroutine subprogram Note that in FORTRAN 77, a block data program unit was called a subprogram
A user-written function or subroutine subprogram that can be invoked from another program unit to perform a specific task Note that in FORTRAN 77, a block data program unit was also called a subprogram
a piece of code (that can be seen as a small program) that performs a single task