In computer science Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems. It is frequently described as the systematic study of algorithmic processes that create, describe and transform information. According to Peter J. Denning, the, a subroutine or subprogram (also called procedure, method, function, or routine) is a portion of code In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language. Source code allows the programmer to communicate with the computer using a reserved number of instructions within a larger program Computer programs are instructions for a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute the instructions. The same program in its human-readable source code form, from which executable, which performs a specific task A task is "an execution path through address space". In other words, a set of program instructions that are loaded in memory. The address registers have been loaded with the initial address of the program. At the next clock cycle, the CPU will start execution, in accord with the program. The sense is that some part of 'a plan is being and is relatively independent of the remaining code.

As the name "subprogram" suggests, a subroutine behaves in much the same way as a computer program that is used as one step in a larger program or another subprogram. A subroutine is often coded so that it can be started ("called") several times and/or from several places during a single execution 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.

Subroutines are a powerful programming Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language. The code may be a modification of an existing source or something completely new. The purpose of programming is to create a program that exhibits a certain tool [1], and the syntax In computer science, the syntax of a programming language is the set of rules that define the combinations of symbols that are considered to be syntactically correct programs in that language. The syntax of a language defines its surface form. Text-based programming languages are based on sequences of characters, while visual programming languages of many programming languages A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication includes support for writing and using them. Judicious use of subroutines (for example, through the structured programming Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. It is most famous for removing or reducing reliance on the GOTO statement approach) will often substantially reduce the cost of developing and maintaining a large program, while increasing its quality and reliability [2]. Subroutines, often collected into libraries In computer science, a library is a collection of subroutines or classes used to develop software. Libraries contain code and data that provide services to independent programs. This allows the sharing and changing of code and data in a modular fashion. Some executables are both standalone programs and libraries, but most libraries are not, are an important mechanism for sharing and trading software. The discipline of object-oriented programming Object-oriented programming is a programming paradigm that uses "objects" – data structures consisting of datafields and methods – and their interactions to design applications and computer programs. Programming techniques may include features such as information hiding, data abstraction, encapsulation, modularity, polymorphism, and is based on methods In object-oriented programming, a method is a subroutine that is exclusively associated either with a class or with an object (in which case it is an instance method). Like a subroutine in procedural programming languages, a method usually consists of a sequence of programming statements to perform an action, a set of input parameters to customize, subroutines that are attached to objects In computer science, an object, in the domain of object-oriented programming, usually means a compilation of attributes and behaviors (methods) encapsulating an entity. However, outside the object-oriented programming domain, the word object may simply mean any entity that can be manipulated by the commands of a programming language, such as a or object classes In object-oriented programming, a class is a programming language construct that is used as a blueprint to create objects of that class. This blueprint describes the state and behavior that the objects of the class all share. An object of a given class is called an instance of the class. The class that contains that instance can be considered as. In the compilation technique called threaded code In computer science, the term threaded code refers to a compiler implementation technique where the generated code has a form that essentially consists entirely of calls to subroutines. The code may be processed by an interpreter, or may simply be a sequence of machine code call instructions, the executable program is basically a sequence of subroutine calls.

Maurice Wilkes, David Wheeler, and Stanley Gill are credited with the invention of this concept, which they referred to as closed subroutine [3].

Contents

Show All>>

 

The above information uses material from Wikipedia and is licensed under the GNU Free Documentation License The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a.
Some facts may not have been fully verified for accuracy. [Disclaimers Wikipedia is an online open-content collaborative encyclopedia, that is, a voluntary association of individuals and groups working to develop a common resource of human knowledge. The structure of the project allows anyone with an Internet connection to alter its content. Please be advised that nothing found here has necessarily been reviewed by]
This page was last archived by our server on Wed Oct 7 17:46:08 2009. [ refresh local cache ]
Displaying this page or its contents does not use any Wikimedia Foundation's resources.
The owners of this site proudly support the Wikimedia Foundation.


Guest Column: Let's Hear It for the Bees - New York Times
judson.blogs.nytimes.com
Guest Column: Let's Hear It for the Bees

New York Times, United States  - Leon KreitzmanLeon Kreitzman

They live by sets of instructions that are familiar to computer programmers as subroutines do this until the stop code, then into the next subroutine , and so on. These humble little bees have an innate ability to work out the location of a food ...
Google News Search: Subroutine,
Sat May 2 07:41:37 2009
How to rererence a pointer argument in a subroutine
software.intel.com
How to rererence a pointer argument in a subroutine

unknown

Fri, 25 Sep 2009 07:48:22 GM

If I make the . Subroutine. test, I get the Error "A dummy argument object cannot be a pointee. [PC] " If I make the function test2 I even get a catastrophic error "catastrophic error: **Internal compiler error: internal abort** Please ...

Google Blogs Search: Subroutine,
Sat Oct 10 20:50:14 2009
Perfect numbers in C++ using a subroutine?
Q. i need a program that prompts the user a number and calls a subroutine to figure out if its perfect. i need major help on this i cant get it started
Asked by alan z - Tue Oct 28 09:12:30 2008 - - 2 Answers - 0 Comments

A. Updated -- Thanks to the guy below, for helping enumerate the formula. It is the most efficient, and we will use it to code our C++ program: // C++ sample program begin bool isPerfect(int n) ; // declare function int main(void) { int x; cout << "Enter a number: "; cin >> x ; if ( isPerfect(x) ) // call to subroutine { cout << x << " is a perfect number!"; } else { cout << x<< " is not a perfect number ..."; } return 0; } bool isPerfect(int n) { bool perfect; int sum; for ( int i = 1; i < ( (n/2) + 1); i ++ ) { if (x%i == 0) sum = sum + i; } if (sum == x) perfect = true; else perfect = false; return perfect; } // C++ sample end
Answered by Razor - Tue Oct 28 09:53:39 2008

Yahoo Answers Search: Subroutine,
Sat May 2 12:44:04 2009