Subroutine , Basic Computer Science

Assignment Help:

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    


Related Discussions:- Subroutine

Input/output (i/o) unit, Input/output (I/o) unit: This unit provides th...

Input/output (I/o) unit: This unit provides the interface between the computer and the computer peripherals. A computer peripheral is any unit, which is attached to, but is no

Explian, explain anatomy of digital coputer

explain anatomy of digital coputer

List and explain different types of media, Question 1 List and explain the...

Question 1 List and explain the ways used to close an MS Word document Question 2 What is MS-Excel? List the steps involved in starting Microsoft Excel Question 3 What i

Courier company , disvange and advantege of providing intternet sservice to...

disvange and advantege of providing intternet sservice to customer

Introduction to microprocessor, The microprocessor is at times referred to ...

The microprocessor is at times referred to as the ''brain'' of the personal computer, and is responsible for the processing of the instructions which creates computer software. It

Software Engineering, You are an engineer involved in the development of a ...

You are an engineer involved in the development of a financial system. During installation, you discover that this system will make a significant number of people redundant. The pe

Server, Server In a network, the resources of computers comprising net...

Server In a network, the resources of computers comprising network are usually shareable. In fact, one of the main objectives of networking is to make the computing resources

Algorithms and pseudocodes.., how do you write the algorithm and the pseudo...

how do you write the algorithm and the pseudo code for cramer''s rule in visual basic.

Explain kinematics modeling in virtual reality, Question 1 How can you cre...

Question 1 How can you create surface with 3D Scanner in geometric modeling? Question 2 Explain kinematics modeling in virtual reality Question 3 Describe object hierarc

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd