• 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.

    对于只为一种精灵,意思是局部的,只有这个函数中,这个脚本中才可以用这个变量,这个变量为全部精灵而创建,意思是这个变量是全局的。

    哈佛公开课 - 计算机科学课程节选

  • But here, as we saw in week zero with the shoe example putting on socks, I have to increment this variable explicitly myself.

    但是这里,像我们上周看到的,鞋子穿在袜子上,我需要亲自明确地增加这个变量。

    哈佛公开课 - 计算机科学课程节选

  • One of the advantages of this is, that I don't have to worry about explicitly updating my variable. That happens for me automatically.

    这样继续下去,这样做的一个优点是,我不用为更新变量来发愁了,程序会自动的为我进行这个操作,这一点很好。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • This is continuously variable because I can vary voltage continuously.

    这是连续改变的,因为我可以逐渐改变电压。

    麻省理工公开课 - 固态化学导论课程节选

  • 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.

    那么这个++符号是递增排序的,所以仅仅是对这个变量加一,现在袜子在脚上是一,那么下一个也是这样。

    哈佛公开课 - 计算机科学课程节选

  • It turns out you can list one, give it a name, and if you use square brackets, that tells the compiler I actually want to put multiple values inside of this -- inside of this variable and how do we do that?

    结果是你可以列举一个,给它取个名字,如果你使用方括号,那是告诉编译器,在里面我需要许多的值--在这些变量里,我怎么做到的?

    哈佛公开课 - 计算机科学课程节选

  • Well, the bracket notation means you can index into this variable.

    好的,这个括号的意思是你可以,索引这个变量。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    你可以想象这个变量,按顺序排列的一块块内存,依次地在内存中紧邻着的,当你指明,按照惯例,涉及,存储的变量在这里。

    哈佛公开课 - 计算机科学课程节选

  • This is what's actually going to create the instance, instantiate it, create what the set of variable values are for it.

    这个声明在你,创建一个实例的时候,实例化这个实例,然后给这个实例。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Now I seem to be violating my own mantra here by just calling this variable A, but this is reasonable, I much as with four loops when you just call an incrementing variable I, because you just need an index, well, same here.

    现在我好像违背了我自己的意愿,我把这个变量叫做A,但这是合理的,就像我们的for循环中,我们把一个增变量叫做,因为我们只要一个索引,这里也一样。

    哈佛公开课 - 计算机科学课程节选

  • The square brackets here, meanwhile, say this is a special type of variable that's got multiple values inside of it.

    这里的这个方括号,同时,说明这个是特殊的变量类型,里面有很多复合的值。

    哈佛公开课 - 计算机科学课程节选

  • And obviously, that ought to involve the variable in some way, or it's not going to make a lot of sense, so this includes the variable, since that's the thing that's changing.

    很明显,这跟计数器的变量有某种关系,否则的话就没多大意义了,因此这跟计数器有关,因为它正是每次循环改变的东西。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • 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.

    事实上缩进意味着,如果变量不等于,就重复我们现在所做的这个过程。

    哈佛公开课 - 计算机科学课程节选

  • What do I now want to do with this variable?

    我要这变量干什么呢?

    哈佛公开课 - 计算机科学课程节选

  • Again, same kind of reasoning says, given some value x, I happened to pick a small one here, what's an easy way to do this? Well, let's just start at one. That's my variable I'm going to change and check.

    好,尤其是,让我们到这里来,让我给大家看看第二个例子,让我把这个注释掉,这是我要解决的,第二个问题,假设我想找到一些整数的,所有除数,我想要找出来这个数的所有的除数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • I can just whip out a variable, this time it's gonna be dynamically stored there.

    我们可以临时分配一个变量,将这个值暂时存放在这个变量中。

    哈佛公开课 - 计算机科学课程节选

  • There's this weird extra variable in there called self.

    好,这是关于面向对象编程,我们需要谈论一点的东西。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • 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.

    当我创建一个绑定的时候,我有一个变量的名字,在这个例子中是,存在一个表中的某处,然后创建一个连接,或者指针从这个名字指向目标值。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Well, get string again is returning the address of the string the user typed in, D the address of the very first character like the letter D and storing that address in this variable s1.

    好的,GetString返回的是,用户输入的字符串的地址,第一个字符的地址,比如字母,然后把这个地址存储在这个变量s1中。

    哈佛公开课 - 计算机科学课程节选

  • What's going on underneath the hood is we'll see pictorially X today is that when I declare this X, this variable X here.

    底下所做的,我们将看到,当我声明这个X,这个变量。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    可以这么说,我们递减这个变量,然后按照控制流,即程序流进入到下一语句。

    哈佛公开课 - 计算机科学课程节选

  • Now, what type of variable is this?

    那么,这个变量的类型是什么?

    哈佛公开课 - 计算机科学课程节选

  • 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.

    要指出的是我们已经,调用了几次这个全局变量,这不是因为斐波那契数列,需要调用它而只是,因为教学上的需要,以便我们可以知道,这个函数做了多少事情。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So I start this program by declaring as I did before a global variable X. It is global simply because it is not inside any of my functions.

    在程序的开始,我声明,一个全局变量X,它是一个全局的,因为它不在任何一个函数里面。

    哈佛公开课 - 计算机科学课程节选

  • And that shows you one other nice little thing we want to do, which is if I look in this code notice I set up a variable up here called false Solution Found, initially bound to false.

    这显示了我们想要做的另一件事,那就是我在这段代码中设置了一个,名为Solution,Found的变量,初始值设为。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Well, this block here on the left that I came counter counter=0 up with arbitrarily sets a variable called counter equal to 0 and then it forever says that counters value 1 and then it changes the counter by 1.

    大家看一下左边的这一段代码,其中有一个随便定义的变量,它会一直显示counter的值,每显示一次,counter加。

    哈佛公开课 - 计算机科学课程节选

  • Now at this point in the story, I have a variable called name, stored inside of that is the string, literally David.

    再回到这里,我有一个名为name的变量,而且把字符串David赋给了name变量。

    哈佛公开课 - 计算机科学课程节选

  • So this declares an integer, a variable of type int called I, 0 and initializes it to zero.

    所以这里声明了一个整型数,一个叫做I的整型变量,把它初始化为。

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定