A section of code, called by the main body of a program, that implements a task. While it may be used at more than one point in a program, it need not be
A piece of a program that is called from another part of the program often a well-structured program will consist of a short main routine that calls many subroutines to do the work
In computer programming, a common term for a shorter sequence of instructions whose execution is repeatedly invoked by a call from an application Routine and subroutine are virtually synonymous terms
A series of instructions that accomplishes a specific task for many other routines (A subsection of a user-written program of varying size and, therefore, function It is written within the program It is not a subsection of a routine ) It differs from a main routine in that one of its parameters must specify the location to which to return in the main program after the function has been accomplished
A discrete component of a program Usually, programs are written in small, manageable parts called subroutines (sometimes just called routines or functions) Each subroutine usually does one well-defined action
A unit of source code that a program can call from other parts of the source code After a subroutine executes to completion, Visual Basic passes control back to the code that called the subroutine Synonymous with procedure
A procedure that performs a specific function; usually a process that may be needed several times or a routine that may be used in several different programs For example, many subroutines have been created to parse URL-encoded data
A procedure placed in a code module which may be called (executed) from any place in any piece of code whether is a procedure associated with an event or another subroutine or function
A set of computer instructions to carry out a predefined function or computation Note: "Open" subroutines are integrated into the main program "Closed" subroutines are arranged so that program control is shifted to them for execution of their task(s) and then returned to the main program
A procedure that can return many values, a single value, or no value to the calling program unit (through arguments) A subroutine is invoked by a CALL statement in another program unit In Fortran 95/90, a subroutine can also be used to define a new form of assignment (defined assignment), which is different from those intrinsic to Fortran 90 Such assignments are invoked with assignment syntax (using the = symbol) rather than the CALL statement See also function, statement function, and subroutine subprogram
A sequenced set of instructions that can be used in one or more programs and at one or more points in a program The execution of a subroutine is usually invoked by a call
An independent program segment separate from the main program that performs a specific task Subroutines are called from the main program with the GOSUB statement and must end with a RETURN statement