Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Parameter
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Computer programming== {{Main|Parameter (computer programming)}} In [[computer programming]], two notions of [[parameter (computer programming)|parameter]] are commonly used, and are referred to as [[Parameter (computer programming)#Parameters and arguments|parameters and arguments]]βor more formally as a '''formal parameter''' and an '''actual parameter'''. For example, in the definition of a function such as : y = ''f''(''x'') = ''x'' + 2, ''x'' is the ''formal parameter'' (the ''parameter'') of the defined function. When the function is evaluated for a given value, as in :''f''(3): or, ''y'' = ''f''(3) = 3 + 2 = 5, 3 is the ''actual parameter'' (the ''argument'') for evaluation by the defined function; it is a given value (actual value) that is substituted for the ''formal parameter'' of the defined function. (In casual usage the terms ''parameter'' and ''argument'' might inadvertently be interchanged, and thereby used incorrectly.) These concepts are discussed in a more precise way in [[functional programming]] and its foundational disciplines, [[lambda calculus]] and [[combinatory logic]]. Terminology varies between languages; some computer languages such as [[C (programming language)|C]] define parameter and argument as given here, while [[Eiffel (programming language)|Eiffel]] uses an [[Parameter (computer programming)#Alternative convention in Eiffel|alternative convention]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)