subroutine


Also found in: Dictionary, Thesaurus, Medical, Legal, Acronyms, Wikipedia.

subroutine

a section of a computer program that is stored only once but can be used when required at several different points in the program, thus saving space

Subroutine

 

the part of a computer program that is used to solve similar-type problems. A subroutine usually describes a separate step in the computation process and can be used more than once in one or several different programs. Typical subroutines are used to compute elementary functions, such as sin x, In x, and e-x, to solve systems of equations, and to remove the results of computations in various forms. If it becomes necessary to use the subroutine during the running of the basic program, the subroutine is called at the appropriate place in the program, and after it has been run, control is transferred back to the main program. A subroutine can call on another.

A subroutine should have the following characteristics: it should be subject to standardized access rules that make it possible to call the subroutine from the main program by means of one or more instructions; it should be able to work with a broad range of initial data, for example, independent variables of a function; it should be relocatable, that is, it should be possible to place and run it in various parts of the computer memory. Subroutines are often arranged in subroutine libraries. So-called standard subroutines satisfying rigid conditions are used in automatic programming.

The use of subroutines is one way to save time and effort in writing computer programs. Subroutines form the basis of modular programming.

REFERENCE

Lavrov, S. S. Vvedenie v programmirovanie. Moscow, 1973. (Bibliography.)

A. V. GUSEV

subroutine

[′səb·rü‚tēn]
(computer science)
A body of computer instruction (and the associated constants and working-storage areas, if any) designed to be used by other routines to accomplish some particular purpose.
A statement in FORTRAN used to define the beginning of a closed subroutine (first definition).

subroutine

(programming)
(Or "procedure") A sequence of instructions for performing a particular task. Most programming languages, including most machine languages, allow the programmer to define subroutines. This allows the subroutine code to be called from multiple places, even from within itself (in which case it is called recursive). The programming language implementation takes care of returning control to (just after) the calling location, usually with the support of call and return instructions at machine language level.

Most languages also allow arguments to be passed to the subroutine, and one, or occasionally more, return values to be passed back.

A function is often very similar to a subroutine, the main difference being that it is called chiefly for its return value, rather than for any side effects.

subroutine

A group of instructions that perform a specific task. A large subroutine might be called a "module" or "procedure." Subroutine is somewhat of a dated term, but it is still quite valid.
References in periodicals archive ?
Finally, inside this subroutine, you can type the message or input box function you want.
Repeating, in complete form the subroutine entries are {[[lambda].
The user can thus decide whether to test for errors individually for each subroutine, collectively for a group of subroutines, or even to ignore them altogether under certain circumstances.
After the robot has learned the various subroutines, they must be edited so that the total program is integrated to provide a continuous flow of movement from one subroutine to the next.
Regarding the program, I will present below a sequence of the subroutine Compass_Get_Axes.
The subroutine for checking the received package includes modulo 2 operation of the data.
The M-code template enables subroutine call and subroutine end.
Contract notice: Master contractor for design, architectural design and project execution cap ampere subroutine optimizing office space.
To contour the slots in these bits, Smith had programmed a subroutine with its previous tooling that took 21/2 to 3 hr to complete.
After the modification of the material properties the standard thermal analyses program is run, then the out put data are interpreted also using a calculus subroutine.
They then describe using modules, creating and using references, working with scoping, manipulating complex data structures, performing subroutine references and file handling references, using practical reference tricks, building larger programs, working with objects and objects with data, performing object destruction, using the exporter, writing a distribution, performing essential testing and contributing to CPAN.
1 "Development of a model for monitoring the availability of high-quality general and vocational education in the Moscow region" list of activities subroutine V "System education quality assessment and disclosure of the education system, "the state program of the Moscow region" Education suburbs "for 2014 - 2018 years, approved by the Government of Moscow Region from 23.