OK. So if we have variables, one of the questions we can ask is, what's the type of the variable.
好,如果我们有了一个变量,我们要问的问题之一就是,这个变量的类型是什么?
OK. Now, last thing about variables, and then we're going to start pushing on this, is where can you use them?
好,关于变量的最后一件事,然后我们就要,结束这个话题了,这个问题就是在什么地方可以应用变量?
The square brackets here, meanwhile, say this is a special type of variable that's got multiple values inside of it.
这里的这个方括号,同时,说明这个是特殊的变量类型,里面有很多复合的值。
The Taylor rule specifies specific variables and everybody at the markets would understand the rule, ? and that's correct, right?
像泰勒规则就明确了具体的变量,市场中每一个参与者也都能够理解,这个没错吧?
Now, this is still a little bit cumbersome, in part because of the variables involved, S including S.
但是这个方法还是有一些笨拙,部分是因为所涉及的变量,包括。
One of the advantages of this is, that I don't have to worry about explicitly updating my variable. That happens for me automatically.
这样继续下去,这样做的一个优点是,我不用为更新变量来发愁了,程序会自动的为我进行这个操作,这一点很好。
For this sprite only, means local, only this function, only this script can use this variable, make this variable for all sprites, meant it was global.
对于只为一种精灵,意思是局部的,只有这个函数中,这个脚本中才可以用这个变量,这个变量为全部精灵而创建,意思是这个变量是全局的。
That's just a graphical incarnation of this thing called an array and notice, the games can, in fact, interact with a human much like Wednesday, I'm leaving my house.
它其实是数组变量的,图形化,具体化,这个游戏实际上是与人交互的,如周三看到的,我正要离开我的房子。
It turns out that slightly before the stack, slightly before this conceptual chunk of memory, there's other things called environment variables that we may see over time but elsewhere in memory are other things.
结果是稍微在堆之前,稍微在这个内存块概念之前,另外还一个东西叫做环境变量,我们之后可能看到,内存中的其他地方,是其他的东西。
But it's a valuable thing. It says, in each case, I return some useful value from this procedure.
但是这就是变量,是在每个例子中,我从这个程序中返回了一些有用的值。
But here, as we saw in week zero with the shoe example putting on socks, I have to increment this variable explicitly myself.
但是这里,像我们上周看到的,鞋子穿在袜子上,我需要亲自明确地增加这个变量。
We decrement so to speak the variable and then where will we go next in terms of the flow control, the flow of this program.
可以这么说,我们递减这个变量,然后按照控制流,即程序流进入到下一语句。
Again, I could have some other functions to compute things, but this is typically the place where I'm going to put them in.
注意这个声明典型的行为,就是为了定义了内部变量,以及类的内部特性,在说一次,我可以写一些。
You don't have to mention any of the local variables, because at this point in the story, they're just not relevant.
你不需要提及任何一个局部变量,因为在这个地方,它们是不相关的。
It's a common mistake to make if you forget that I've actually declared that variable up top, but wait a minute, I know any time that I use a variable, I have to declare it.
这是一个通常犯的错误,如果你忘了,之前在前面已经声明了这个变量,等等,我知道在任何时候,我使用一个变量,我必须声明它。
Right, so the fact that everything is indented means while 2 we're doing, while the variable is not equal to 2, keep doing this.
事实上缩进意味着,如果变量不等于,就重复我们现在所做的这个过程。
It turns out that when you're talking about macroscopic properties of matter, you don't need very many variables to describe the system completely thermodynamically.
实际上,当你谈及物质的宏观性质时,你并不需要很多变量才能从热力学上,完整地描述这个系统,’
Let's look at this 8th variance of this, otherwise, simple example.
这是这个例子的第8个变量版本,很简单。
Well, the bracket notation means you can index into this variable.
好的,这个括号的意思是你可以,索引这个变量。
If you have an experiment and the outcome of the experiment is a number, then a random variable is the number that comes from the experiment.
如果你有一个试验,这个试验的结果是一个数,那么相对应的随机变量,指的就是这个试验结果所对应的那个数
So this plus plus is sort of shorthand notation for incrementation. So just add 1 to this variable's value, so now socks on feet is of course 1 and so next.
那么这个++符号是递增排序的,所以仅仅是对这个变量加一,现在袜子在脚上是一,那么下一个也是这样。
I can just whip out a variable, this time it's gonna be dynamically stored there.
我们可以临时分配一个变量,将这个值暂时存放在这个变量中。
ArgV You can think of this variable Arg V as literally an array a sequence of chunks of memory that literally are back to back to back in memory, and when you say bracket zero, by convention, you are referring to the variables stored here.
你可以想象这个变量,按顺序排列的一块块内存,依次地在内存中紧邻着的,当你指明,按照惯例,涉及,存储的变量在这里。
All right. Second question: or maybe a better way of saying this, and the general format you're likely to see here is, a test involving a variable name, which must be initialized outside of the loop, and which interior to the loop gets changed, so that the test is going to change.
好,第二个问题:,换种更好的方式来说吧,你们通常喜欢的,方式是,这个测试涉及到一个变量名字,变量在循环外已经被初始化,然后循环内部会改变这个变量的值,因此测试结果会改变。
And when I create a binding, x I'm taking a variable name, in this case x, stored somewhere in a table, and I'm creating a link or a pointer from that name to that value.
当我创建一个绑定的时候,我有一个变量的名字,在这个例子中是,存在一个表中的某处,然后创建一个连接,或者指针从这个名字指向目标值。
Now, what type of variable is this?
那么,这个变量的类型是什么?
B It swaps this one and these two, A and B, but it has no access to main's memory.
它交换了这个和这两个变量,A和,但是它没有介入到main的内存中。
And what it's saying semantically is, using that variable as my placeholder, have it walk through this collection, starting at the first thing, execute that code, then the next thing, execute that code, and so on.
它的语义意思就是,把这个变量应用为我的占位符,用它来遍历这个集合,从第一个元素开始,执行代码,然后下一个元素,再执行代码。
And the thing I wanted point out is, we've got this global variable number of calls. Which is there not because Fibonacci needs it but just for pedagogical reasons, so that we can keep track of how much work this thing is doing.
要指出的是我们已经,调用了几次这个全局变量,这不是因为斐波那契数列,需要调用它而只是,因为教学上的需要,以便我们可以知道,这个函数做了多少事情。
应用推荐