docker自定义参数
Parameters identify values that are passed into a function. For example, a function to add three numbers might have three parameters. A function has a name, and it can be called from other points of a program. When that happens, the information passed is called an argument. Modern programming languages typically allow functions to have several parameters.
参数标识传递给函数的值 。 例如,一个将三个数字相加的函数可能具有三个参数。 函数具有名称,可以从程序的其他位置调用它。 发生这种情况时,传递的信息称为参数。 现代编程语言通常允许函数具有多个参数。
功能参数 ( Function Parameters )
Each function parameter has a type followed by an identifier, and each parameter is separated from the next parameter by a comma. The parameters pass arguments to the function. When a program calls a function, all the parameters are variables. The value of each of the resulting arguments is copied into its matching parameter in a process call pass by value. The program uses parameters and returned values to create functions that take data as input, make a calculation with it and return the value to the caller.
每个函数参数都有一个类型,后跟一个标识符,并且每个参数与下一个参数之间用逗号分隔。 参数将参数传递给函数。 当程序调用函数时,所有参数都是变量。 每个结果参数的值在按值传递的过程调用中被复制到其匹配参数中。 该程序使用参数和返回值来创建函数,这些函数将数据作为输入,使用它进行计算,然后将该值返回给调用方。
函数和参数之间的区别 ( The Difference Between Functions and Arguments )
The terms parameter and argument are sometimes used interchangeably. However, parameter refers to the type and identifier, and arguments are the values passed to the function. In the following C++ example, int a and int b are parameters, while 5 and 3 are the arguments passed to the function.
术语参数和自变量有时可以互换使用。 但是,参数是指类型和标识符,而参数是传递给函数的值。 在下面的C ++示例中, int a和int b是参数,而5和3是传递给函数的参数。
int addition (int a, int b){ int r; r=a+b; return r;}
int addition (int a, int b){ int r; r=a+b; return r;}
int main (){ int z; z = addition (5,3); cout << "The result is " << z;}
使用参数值 ( Value of Using Parameters )
- Parameters allow a function to perform tasks without knowing the specific input values ahead of time. 参数允许函数执行任务而无需提前知道特定的输入值。
- Parameters are indispensable components of functions, which programmers use to divide their code into logical blocks. 参数是功能中必不可少的组成部分,程序员可将参数用于将其代码划分为逻辑块。
翻译自: https://www.thoughtco.com/definition-of-parameters-958124
docker自定义参数