注意double主体前的等于号。
双等于号用于比较而不是用于设置值。
The double equal sign is used for comparisons, rather than setting values.
在单等于号后面的位置中,输入30。
为什么是一个等于号?
注意等于号(=)和eq操作符之间的区别。
Note the difference between the equal sign (=) and the eq operator.
造成这样意外结果的原因是在方法定义中缺少的等于号。
The cause of this unexpected behavior is a missing equals sign in the method definition.
方法主体前面的等于号告诉编译器函数的主体从这里开始,就像我们看到的一样。
The equals sign before the method body tells the compiler, as well as the human reader, where the method body begins.
行49,列10:xml语法错误:不合法的元素名称。(就是那个等于号)。
Line 49, Column 10: XML Parsing Error: StartTag: invalid element name.
造成这样意外结果的原因是在方法定义中缺少的等于号。下面是我们实际上需要的定义。
The cause of this unexpected behavior is a missing equals sign in the method definition. Here is the definition we actually intended.
Scala把主体之前的部分包含等于号作为函数定义,而一个函数在函数式编程中永远都有返回值。
Scala regards a method with the equals sign before the body as a function definition and a function always returns a value in functional programming.
使用单等于号来向变量赋值,而不是像在前一个条件中那样使用双等于号 (==) 来比较值。
Use the single equal sign to assign a value to a variable, unlike the double equal sign (==), as in the previous condition, which compare the values.
所以,在小角度近似值中,就等于mg, that,I, can, make,t, the,same, as, mg。,这是近似值,但是依然写等于号。
So I simply have, in my small-angle approximation, t It's approximately, but I still put an equals sign there.
因为分号,函数返回类型,方法参数列表,甚至大括号都经常会被省略,使用等于号可以避免几种可能的二义性。使用等于号也提醒了我们,即使是函数,在Scala里面也是值。
Because semicolons, function return types, method arguments lists, and even the curly braces are sometimes omitted, using an equals sign prevents several possible parsing ambiguities.
因为分号,函数返回类型,方法参数列表,甚至大括号都经常会被省略,使用等于号可以避免几种可能的二义性。使用等于号也提醒了我们,即使是函数,在Scala里面也是值。
Because semicolons, function return types, method arguments lists, and even the curly braces are sometimes omitted, using an equals sign prevents several possible parsing ambiguities.
应用推荐