All right, c p 1 dot y, x I've said assign that to the value 2, 2,0. So now c p 1 has inside of it an x and y value.
一个特定的版本,我现在命名了一个内置变量,并给它赋值了,我刚刚做的也就是给它。
- And here as promised is that other operator -- looks a little weird, but because assignment is already using the equal sign to assign one value on the right to a variable on the left.
在这里正像所承诺的那样,其他的操作-,看起来有点怪异,但是因为“=“已经被用来当赋值运算符了,用来把右边的一个值赋值给左边的变量。
I can give two names, which will get bound to the two parts of that return tuple.
我可以给它设两个变量,返回的一对值将会被赋给这两个变量。
x Inside of that structure, create a variable name x, and a value associated with it.
创建了一个变量名为,然后给它赋值,请注意我也在这边做的操作。
And it's up to me to put that return value in a variable.
那个放在变量中的值是取决于我所赋的值。
And so we saw that as well, the last piece we had here is the ability to create variables, which have their own values, and that's done using an assignment statement.
我们也可以看到,这里我们最后的是,创建了一些变量,这些变量都有自己的值,这是运用了赋值声明来完成的。
Well, unfortunately in C, you have to be ever so specific as to what you wanna put in the variable.
很不幸,在C语言里,给变量赋值之前,你必须搞清楚它的数据类型。
I declare a variable called n. I'm not giving it a value yet, so I had better be careful.
我申明一个变量n,我先不给它赋值,所以我最好小心点。
Just to remind you what it does, we bound x to some value, we set up an initial variable called ANS or answer, answer and then we run through a little loop.
记住你要做些什么,我们给x赋一个值,我们建立一个初始变量,命名为ANS或者。
But that table does not affect any bindings for other instances of the variable like x for ANS.
这时这个局部表就消失了,这个局部表将不会影响其它赋值,比方说像ANS对应的x变量。
Did the same thing with c p 2, 2 2 0 Again, remind you, c p 2 is a different instance of this data type.
建立了一个x变量,我也把它赋值为,因此cp1内置有了x和y值,然后对cp2做同样的操作。
We've seen in class that you get garbage values if you don't initialize something to a value so let me actually initialize x to a value.
我们在课程上了解到,如果你不给一个变量,进行赋值,它会获得一个无效值,让我把x初始化为一个值。
Z So it would be incorrect to try to assign this to a variable X or Y or Z, because it doesn't actually give me anything back.
这个是错误的,来赋值这个给变量X或Y或,因为它的确没有返回什么给我。
应用推荐