Parameter (computer programming)

In computer programming, a parameter or a formal argument is a special kind of variable used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are the values of the arguments (often called actual arguments or actual parameters) with which the subroutine is going to be called/invoked. An ordered list of parameters is usually included in the definition of a subroutine, so that, each time the subroutine is called, its arguments for that call are evaluated, and the resulting values can be assigned to the corresponding parameters.

Comment
enIn computer programming, a parameter or a formal argument is a special kind of variable used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are the values of the arguments (often called actual arguments or actual parameters) with which the subroutine is going to be called/invoked. An ordered list of parameters is usually included in the definition of a subroutine, so that, each time the subroutine is called, its arguments for that call are evaluated, and the resulting values can be assigned to the corresponding parameters.
Has abstract
enIn computer programming, a parameter or a formal argument is a special kind of variable used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are the values of the arguments (often called actual arguments or actual parameters) with which the subroutine is going to be called/invoked. An ordered list of parameters is usually included in the definition of a subroutine, so that, each time the subroutine is called, its arguments for that call are evaluated, and the resulting values can be assigned to the corresponding parameters. Unlike argument in usual mathematical usage, the argument in computer science is the actual input expression passed/supplied to a function, procedure, or routine in the invocation/call statement, whereas the parameter is the variable inside the implementation of the subroutine. For example, if one defines the add subroutine as def add(x, y): return x + y, then x, y are parameters, while if this is called as add(2, 3), then 2, 3 are the arguments. Note that variables (and expressions thereof) from the calling context can be arguments: if the subroutine is called as a = 2; b = 3; add(a, b) then the variables a, b are the arguments, not the values 2, 3. See the section for more information. The semantics for how parameters can be declared and how the (value of) arguments are passed to the parameters of subroutines are defined by the evaluation strategy of the language, and the details of how this is represented in any particular computer system depend on the calling convention of that system. In the most common case, call by value, a parameter acts within the subroutine as a new local variable initialized to the value of the argument (a local (isolated) copy of the argument if the argument is a variable), but in other cases, e.g. call by reference, the argument variable supplied by the caller can be affected by actions within the called subroutine.
Hypernym
Kind
Is primary topic of
Parameter (computer programming)
Label
enParameter (computer programming)
Link from a Wikipage to another Wikipage
.NET Framework
Ada (programming language)
Ada 83
Ada 95
Argument of a function
Associative array
C (programming language)
C++
Call by reference
Call by sharing
Call by value
Calling convention
Category:Subroutines
Category:Variable (computer science)
Clojure
Command-line argument
Common Lisp
Computer programming
C Sharp (programming language)
Currying
Datatype
Default argument
Denotational semantics
Eiffel (programming language)
Evaluation strategy
Exception handling
Floating point
Fortran
Fortran 66
Fortran 77
Fortran 90
Fortran procedures and functions
Free variables and bound variables
Function application
Function composition (computer science)
Function signature
Generic programming
Go (programming language)
Haskell (programming language)
Lambda calculus
Literal (computer programming)
Local variable
ML (programming language)
Named parameter
Nullable type
Null pointer
Operational semantics
Operator associativity
Operator overloading
Option type
Parallel assignment
Pascal (programming language)
Programming language
Python (programming language)
Return value
Ruby (programming language)
Run time (program lifecycle phase)
Runtime error
Scope (computer science)
Self-documenting
Semipredicate problem
SQL
SQL
Strongly typed programming language
Subprograms
Subroutine
Swift (programming language)
Syntactic sugar
Tagged union
Tcl (programming language)
Transact-SQL
TScript
Tuple
Type inference
Type theory
Unit type
Value (computer science)
Variable (programming)
Variadic function
Windows PowerShell
SameAs
Argumento (informática)
Færibreyta
m.01vzgc
Parameter (computer programming)
Parameter (computer science)
Parameter (Informatik)
Parameter (informatikk)
Parameter (računalništvo)
Parametr
Parametr (informatyka)
Paràmetre (informàtica)
Paramètre (programmation informatique)
Parametr funkce
Parametri (tietotekniikka)
Parâmetro (ciência da computação)
Parametro (programado)
Parametro (programmazione)
Q1410440
RCQZ
Tham số (lập trình máy tính)
Παράμετρος (υπολογιστές)
Параметр (программирование)
Параметр (програмування)
وسيط (برمجة حاسوب)
پارامتر (برنامه‌نویسی رایانه‌ای)
參數 (程式設計)
引数
매개변수 (컴퓨터 프로그래밍)
Subject
Category:Subroutines
Category:Variable (computer science)
WasDerivedFrom
Parameter (computer programming)?oldid=1123431630&ns=0
WikiPageLength
30463
Wikipage page ID
324375
Wikipage revision ID
1123431630
WikiPageUsesTemplate
Template:Citation needed
Template:Efn
Template:Notelist
Template:Other uses
Template:Reflist
Template:Short description
Template:Visible anchor