Internet Encyclopedia of Science
COMPUTERS, AI, CYBERNETICS
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z

                   HOME
ABOUT
CATEGORIES
USE OF TEXT AND IMAGES
NEWSLETTER

  



subroutine


  1. The set of instructions necessary to direct a computer to carry out a well-defined mathematical or logical operation.

  2. A subunit of a routine. A subroutine is often written in relative or symbolic coding even when the routine to which it belongs is not.

  3. A portion of a routine that causes a computer to carry out a well-defined mathematical or logical operation.

  4. A routine which is arranged so that control may be transferred to it from a master routine and so that, at the conclusion of the subroutine, control reverts to the master routine. Such a subroutine is usually a closed subroutine (see below).

  5. A single routine may simultaneously be both a subroutine with respect to another routine and a master routine with respect to a third. Usually control is transferred to a single subroutine from more than one place in the master routine and the reason for using the subroutine is to avoid having to repeat the same sequence of instructions at different places in the master routine.

A closed subroutine is a subroutine not stored in the main path of the routine. Such a subroutine is entered by a jump operation and provision is made to return control to the main routine at the end of the operation. The instructions related to the entry and re-entry function constitute a linkage.


Related category

   • COMPUTERS, ARTIFICIAL INTELLIGENCE, AND CYBERNETICS


Also on this site:

Encyclopedia of Alternative Energy & Sustainable Living
Encyclopedia of History





BACK TO TOP