Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
7 user(s) are online (7 user(s) are browsing encyclopedia)

Members: 0
Guests: 7

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Parameter (computer science)

Parameters are a way of allowing the same sequence of commands to operate on different data without re-specifying the instructions.

For example, take the following list of instructions:

# Take an object. # Break object into little pieces. # Throw object away.

In this case, the object that the instructions are to operate on is the parameter. If we give this process a name like Destroy, then referring to Destroy followed by the desired object will perform the actions on that object.

For instance:

# Destroy rock. # Destroy cake. # Destroy car.

will apply the instructions above to a rock, cake, and car respectively.

The sequence of instructions is usually made into a within the subprogram used to describe the operations on the argument (in the example: object) is called a formal parameter or simply a parameter .

The mechanism by which a parameter is passed to a function or procedure depends upon the evaluation strategy of the language.

Some languages distinguish between parameters for input, for output, or both . Virtually all older programming languages —with the notable exception of Ada— regard output and both as identical. Many modern languages regard function parameters as input only (references are merely input values) and return values as output only ; mutation of references is then a computational effect rather than an output of the function. Others (such as C Sharp programming language) may tag parameters for input and output.

See also: Free variables and bound variables