Subroutine , Basic Computer Science

Subroutine:  

A subroutine  is a type of subprogram, a piece of code within a larger program that performs a specific task and is relatively independent of the remaining code.  It is also called a procedure, routine or a method.  A subroutine has no value associated with its name. All outputs are defined in terms of arguments; there may be any number of outputs. 

 In most cases, a subroutine needs some information about the circumstances in which it has been called. A procedure that performs repeated or shared tasks uses different information for each call. This information consists of variables, constants, and expressions that you pass to the procedure when you call it.

  A parameter represents a value that the procedure expects you to supply when you call it. You can create a procedure with no parameters, one parameter, or more than one. The part of the procedure definition that specifies the parameters is called the parameter list. 

 An argument represents the value you supply to a procedure parameter when you call the procedure. The calling code supplies the arguments when it calls the procedure. The part of the procedure call that specifies the arguments is called the argument list. For example here is a subroutine to find the sum of three numbers    

Posted Date: 10/23/2012 3:58:31 AM | Location : United States







Related Discussions:- Subroutine , Assignment Help, Ask Question on Subroutine , Get Answer, Expert's Help, Subroutine Discussions

Write discussion on Subroutine
Your posts are moderated
Related Questions
In order to be able to make a program, quite a lot of tools are needed: Earliest an editor is used to create the source program. Next a compiler, which is nothing more than a progr


Satellite Transmission: Satellites use microwave frequencies and techniques. Satellites used for message transmission (as opposed to those, which travel around the earth on st

Given the following grammar: -> [ , ] | -> | { } -> a | b | cwhich are the strings generated by the grammar? Show the parse tree(s). a). { [ a , b ] }b). [ { a } , b ]

Embedded Operating Systems, Devices have EOS built-in, OPERATING SYSTEM embed on the System itself, Cell phones, PDAs, medical equipment Fast, Application specific Stable a

I am using block matching algorithm to get the motion vectors, now, how can I get the depth map/depth value from the motion vectors?

Question: CarRide.com is the web portal to CarRide Ltd; a car rental company that makes full use of technological advances to make sure you enjoy the ride with your rental car.

Selects among the processes in memory which are ready to execute & allocates the CPU to one of them CPU scheduling decisions can be taken place when a process: A. Terminates B. Swi

Backup Storage: Back up (backing) storage, also termed external storage, is used to hold programs and data which are read into internal storage when required. The most common

Language of Digital Computers: Digital computers are electronic devices which operate on two valued logic (On and OFF). The ability of a transistor to act as a switch is the k