🔵 🔵 🔵


Primary

၊၊||၊|။

Parameter ○꠹ᴾᴿᴳᴿᴹ|Definition|1st|20251119205401-00-⌔

Parameter (computer programming) - Wikipedia

Parameter (computer programming)

In computer programming, a parameter, or formal argument, is a variable that represents an argument to a function call.1234 A function’s signature defines its parameters. A call invocation involves evaluating each argument expression of a call and associating the result with the corresponding parameter.

For example, consider the Python function

def add(x: int, y: int) -> int: 
   return x + y

Variables x and y are parameters, each of type int. For call add(2, 3), the expressions 2 and 3 are arguments. For call add(a + 1, b + 2), the arguments are a + 1 and b+2.

Parameter passing is defined by a programming language. Evaluation strategy defines the semantics for how parameters can be declared and how arguments are passed to a function. Generally, with call by value, a parameter acts like a new, local variable initialized to the value of the argument. If the argument is a variable, the function cannot modify the argument state because the parameter is a copy. With call by reference, which requires the argument to be a variable, the parameter is an alias of the argument.

Printed 2026-06-28.

(echo:: @ )

Footnotes

  1. “Passing Information to a Method or a Constructor (Learning the Java Language > Classes and Objects)”. The Java™ Tutorials. Retrieved 2021-09-09. Parameters refers to the list of variables in a method declaration. Arguments are the actual values that are passed in when the method is invoked. When you invoke a method, the arguments used must match the declaration’s parameters in type and order.

  2. Prata, Stephen (2004). C primer plus (5th ed.). Sams. pp. 276–277. ISBN 978-0-672-32696-7.

  3. “Working Draft, Standard for Programming Language C++” (PDF). Open Standards. 2005-10-19. Archived from the original (PDF) on December 14, 2005. Retrieved 1 January 2018.

  4. Gordon, Aaron. “Subprograms and Parameter Passing”. rowdysites.msudenver.edu/~gordona. Archived from the original on 1 January 2018. Retrieved 1 January 2018.

Link to original

Secondary

• • •