某个参数如果在子程序或函数中没有用到,那就被称为哑元。这是程序设计语言中的一个术语,不是FORTRAN独有的:)
函数的形参又称“哑元”,实参又称“实元”。
广义,狭义的理解不同而已:函数过程
呵呵,这样啊。那看来咱用的教材不一样:)在C++的运算符重载中,就会用到哑元以区分i++与++i的区别:)且在C/C++中,哑元是可以没有变量名的,如:int
哑元
dummy argument 又叫哑元变量
声明并定义一个函数
void f(int)
{
}
函数f有一个int参数,但没有给这个参数声明变量,所以在函数的实现中你永远
也无法使用这个函数,这个参数只是一个占位符,一般是因为兼容性方面的原因
这样做的。
又或者在++操作符定义中也需要这种占位符。
实际变量 就不用解释了吧?
如:
声明并定义一个函数 void { } 函数f有一个int参数,但每个给这个参数声明变量,所以在函数的实现中你永远 也无法使用这个函数,这个参数只是一个占位符,一般是因为兼容性方面的原因 这样做的。 Good |
如:
声明并定义一个函数 void { } 函数f有一个int参数,但每个给这个参数声明变量,所以在函数的实现中你永远 也无法使用这个函数,这个参数只是一个占位符,一般是因为兼容性方面的原因 这样做的。 Good |
如:
声明并定义一个函数 void { } 函数f有一个int参数,但每个给这个参数声明变量,所以在函数的实现中你永远 也无法使用这个函数,这个参数只是一个占位符,一般是因为兼容性方面的原因 这样做的。 Good |
如:
声明并定义一个函数 void { } 函数f有一个int参数,但每个给这个参数声明变量,所以在函数的实现中你永远 也无法使用这个函数,这个参数只是一个占位符,一般是因为兼容性方面的原因 这样做的。 Good |
Dummy variables refer to "proxy" variables or numericstand-ins for qualitativefacts in a regressionmodel. In regressionanalysis, the dependentvariables are influenced not only by quantitative variables(income, output, prices, etc.), but also by qualitative variables(gender, religion, geographic region, etc.) Dummy independentvariables take the value of 0 or 1. Hence, they are also calledbinary variables. A dummy explanatory variable with a value of 0will cause that variable's coefficient todisappear and a dummy with a value 1 will cause the coefficient toact as a supplemental intercept in a regression model. For example,suppose Gender is one of the qualitative variables relevant to aregression. Then, female and male would be the categories includedunder the Gender variable. If female is assigned the value of 1,then male would get the value 0 (or vice-versa). [1]
Thus, a dummy variable can be defined as a qualitativerepresentative variable incorporated into a regression, such thatit assumes the value 1 whenever the category it represents occurs,and 0 otherwise. [2] Dummyvariables are used as devices to sort data into mutuallyexclusive categories (such as male/female, smoker/non-smoker,etc.) [3]
Dummy variables are generally used frequently in timeseries analysis with regime switching, seasonal analysis andqualitative data interpretation. Dummy variables are involved instudies for economicforecasting, bio-medical studies, credit scoring,response modelling, etc. Dummy variables may be incorporated intraditional regression methods or newly developed modelingparadigms.[1]
Synonyms for the term dummy variables include design variables,Boolean indicators, proxies, indicator variables, categoricalvariables and qualitative variables. [1][3]
In mathematics, and in other disciplinesinvolving formal languages, including mathematical logic and computer science, a free variable is anotation that specifies places in anexpression where substitution may take place. The idea is related to aplaceholder (a symbol that will later be replaced by someliteral string), or a wildcard character that stands for anunspecified symbol.
The variable x becomes a bound variable, forexample, when we write
- 'For all x, ( x + 1) 2 = x 2 +2 x + 1.'
or
- 'There exists x such that x 2 = 2.'
In either of these propositions, it does not matter logicallywhether we use x or some other letter. However, it could beconfusing to use the same letter again elsewhere in some compoundproposition. That is, free variables becomebound, and then in a sense retire from being available asstand-in values for other values in the creation of formulae.
In computer programming, a free variableis a variable referred to in a function that is not a local variable or an argument of that function.[1]An upvalue is a free variable that has been bound (closedover) with a closure. Note that variable "freeness" only applies inlexical scoping: there is nodistinction, and hence no closures, when using dynamic scope.
The term "dummy variable" is also sometimes used for a boundvariable (more often in general mathematics than in computerscience), but that use creates an ambiguity with the definition ofdummy variables in regression analysis.