Examples of using The subroutine in English and their translations into Serbian
{-}
-
Colloquial
-
Ecclesiastic
-
Computer
-
Latin
-
Cyrillic
Can you remove the subroutine?
The subroutines are all interconnected.
It keeps getting stuck in the subroutine.
The subroutines need to be arranged in cascading sequence.
You're a new personality… from the subroutines.
The subroutine would be coded as MYSUB NOP(Storage for MYSUB's return address.).
Hiding implementation details from users of the subroutine.
Identify variables outside the subroutine that are accessible within it.
Usually an actual subroutine parameter is evaluated once before the subroutine is called.
The subroutine may also return a computed value to its caller(its return value), or provide various result values or out(put) parameters.
Knuth observes that the subroutine return embedded in the program itself rather than in special registers is attributable to von Neumann and Goldstine.
Call by value-result Parameter value is copied back on entry to the subroutine and again on return Algol.
The subroutine could then return to the main program by executing the indirect jump JMP MYSUB, I which branched to the location stored at location MYSUB.
Values may be returned by assigning to an identifier that has the same name as the subroutine, a function in Pascal terminology.
One is that each task has its own stack,and thus the subroutine can be reentrant, that is, can be active simultaneously for different tasks doing different things.
A method used to eliminate this overheadis inline expansion or inlining of the subprogram's body at each call site(versus branching to the subroutine and back).
In some languages,each subroutine call also implies automatic testing of the subroutine's return code, or the handling of exceptions that it may raise.
If the subroutine needed that register for some other purpose(such as calling another subroutine), it would save the register's contents to a private memory location or a register stack.
One is that each task can have its own stack,and thus the subroutine can be thread-safe, that is, can be active simultaneously for different tasks doing different things.
For example, the use of is generally deemed unwise by advocates for this perspective,because it adds tight coupling between the subroutine and these global variables.
The subroutine typically requires standard housekeeping code- both at entry to, and exit from, the function(function prologue and epilogue- usually saving general purpose registers and return address as a minimum).
Inlining however, will usually increase the code size,unless the program contains only one call to the subroutine, or the subroutine body is less code than the call overhead.
A subroutine is often coded so that it can be started several times and from several places during oneexecution of the program, including from other subroutines, and then branch back(return) to the next instruction after the call, once the subroutine's task is done.
If a tail call might lead to the same subroutine being called again later in the call chain, the subroutine is said to be tail-recursive, which is a special case of recursion.
(Informally we can think of such a machine as an algorithm that can call a subroutine for solving H and solves L in polynomial time if the subroutine call takes only one step to compute.).
In the called subroutine, the first code executed is usually termed the subroutine prologue, since it does the necessary housekeeping before the code for the statements of the routine is begun.
For instance, on platforms where the call stack does not justcontain the return address, but also the parameters for the subroutine, the compiler may need to emit instructions to adjust the call stack.
Along with Maurice Wilkes and Stanley Gill he is credited with the invention of the subroutine(which they referred to as the closed subroutine), because of which a jump to subroutine instruction is often called Wheeler Jump.