In computer programming , a parameter or an ” argument ” is a value that is passed to a function. Most modern programming languages ​​allow functions that have multiple parameters.

By the way, syntax is quite different for different programming languages ​​in a function declaration, a typical function containing two parameters would look something like this: –

function graphXY(x, y)  {  ...  }

When this function is called within a program, two variables must be passed to the function. It looks like this:

$horizontal = 22;  $vertical = 40;  graphXY($horizontal, $vertical);

For example, values ​​22 and 40 (which are stored in variables $ horizontal and $ vertical respectively) are actually “input parameters” that are passed to the graphXY () function.

When the input parameters in a function are mejud, then the output of the function is often affected by the values ​​that are passed to the function. In this case, a single function is called many times within a program and it always produces different outputs.

« Back to Wiki Index