很不幸,在C语言里,给变量赋值之前,你必须搞清楚它的数据类型。
Well, unfortunately in c, you have to be ever so specific as to what you wanna put in the variable.
这种代码块更常见的使用是给变量赋值,正如你在视图页面顶部所看到的那种。
A more common use for this kind of code block is to assign values to variables, as you can see at the top of the view page.
例如,如果您有一个希望赋值给许多目标的值,您可以使用赋值来将某个值设置到该变量,然后使用从该变量到多个属性的移动转换。
For example, if you have a value that you want to assign to many targets, you can use an assign to set a value to the variable, then use a move transform from that variable to multiple attributes.
本文中的这个例子是将变量赋值给一个矩阵。
当您将一个变量赋值给任何列表时,您就为该列表分配了一个指针或引用。
When you assign any list to a variable, you're really assigning a pointer or reference to the list.
清单1中的处理程序代码将读取消息主体,并将其赋值给静态变量。
The handler code in Listing 1 reads the message body and assigns it to a static variable.
视图还可以给模板变量赋值;这些值会在运行时自动地填充到页面模板中。
Views can also assign values to template variables; these values are automatically interpolated into the page templates at run-time.
函数是FP 的一类公民,这意味着它们可以被赋值给变量,被传递给其他函数等,就像普通的值一样。
Functions are “first-class” citizens in FP, meaning they can be assigned to variables, passed to other functions, etc., just like other values.
相反,系统将创建新的简单类型对象并将其赋值给变量。
Instead, a new simple type object is created and assigned to the variable.
能够这样做是因为,与其他值一样,function对象可以赋值给变量。
You can do this because function objects can be assigned to variables, just like any other value.
该切片所引用的数组分段可以通过将新的切片赋值给同一变量来更改。
The segment of the array that the slice references can be changed by assigning a new slice to the same variable.
每个都可以赋值给一个变量,作为参数传递,或作为返回值从函数中返回。
Each can be assigned to a variable, passed as an argument, or returned from a function. For instance, here's an example of storing a function.
然后,这个示例将赋值给变量d1的dictionary 赋值给另一个变量d2。
This example then assigns the dictionary assigned to the variable d1 to the variable d2.
演示将XMLQUERY的输出赋值给xml类型的变量。
Show that the output from XMLQUERY can be assigned to a variable of type XML.
正如前面提到过的,系统会自动将一个新的Rate实例赋值给out put1变量。
As mentioned earlier, a new rate instance is automatically assigned to the output1 variable. To keep things simple, you only assigned values to the output1.rate.
所以你可以在全局的列表或者字典里面添加、删除或者替换元素,但如果你要重新给这个全局变量赋值,就必须要声明了。
So you can add, remove and replace elements of a global list or dictionary, but if you want to reassign the variable, you have to declare it.
这个规则集包含一些更有问题的检验,其中包括把null赋值给变量、方法中有多个返回点,以及从sun包导入等。
This rule set contains some of the more questionable checks, including assigning null to a variable, multiple return points from a method, and importing from the sun packages.
在“main”函数里的改变更有意思,在这里我们首先映射我们文件的了吧到一个异步工作流的列表上,并把它赋值给一个“tasks”标识符(即变量)。
The changes to the "main" function are more interesting, here first we map our list of files to a list of asynchronous workflow and bind it to the identifier "tasks".
在后台,Python将创建一个整数对象,并将对新对象的引用赋值给变量。
Under the covers, Python creates an integer object and assigns the variable to reference the new object.
将JSON数据赋值给变量。
要运行这些代码,我们创建一个新的Upper实例,然后把它赋值给一个名为up的变量。
To exercise the code, we create a new Upper instance and assign it to a variable named up.
给一个变量成员赋值也不是那么乏味的工作了,当你发现你不需要打全变量名字的时候!
Assigning various members off an instance isn't so tedious anymore, when you don't have to keep typing out the instance name! (see below)!
ExtractLocalVariable重构取出一段被直接使用的表达式,然后将这个表达式首先赋值给一个局部变量。
The Extract local variable refactoring takes an expression that is being used directly and assigns it to a local variable first.
换句话说,如果想把一个结构体赋值给另一个结构体,就必须让该结构体的每一个成员变量都能被程序合法的赋值。
In other words, a struct value can be assigned to a struct variable only if every field of the struct may be legally assigned individually by the program.
右侧的内容先进行运算,然后这些元素会赋值给左侧的变量。
The right side is evaluated and then its elements are assigned to the variables on the left.
如果你想给全局变量重新赋值,结果会很意外。下面的例子中,本来是想要追踪确定函数是否被调用了。
If you try to reassign a global variable, you might be surprised. The following example is supposed to keep track of whether the function has been called.
当一个浮点型数据赋值给整型变量时会发生?
What happen when a floating point value is assigned to an integer variable?
如果请求确实成功了,我们会对从服务器端返回来的JSON进行求值,然后把其赋值给一个数据变量。
If the request was indeed successful, we eval the JSON returned from the server and assign it to a data variable.
上下文是简单的变量和表达式所需的函数,将返回一个值,并且赋值给标识,包括在符号表中的。
A context is simply the variables and functions that are needed by the expression to return a value, and are assigned to the identified included inside the Symbol Table.
避免在条件中直接调用返回布尔值的函数。把返回值赋值给一个局部变量来使用。
Avoid function calls in Boolean conditional statements. Assign into local variables and check on them.
应用推荐