In computer programming, a procedure is an independent code module that fulfills some concrete task and is referenced within a larger body of source code. This kind of code item can also be called a function or a sub-routine. The fundamental role of a procedure is to offer a single point of reference for some small goal or task that the developer or programmer can trigger by invoking the procedure itself.
A procedure may also be referred to as a function, subroutine, routine, method or subprogram.