• And notice because I have just one line of code inside of each of these branches, what have I clearly omitted?

    请注意因为我在每个分支中只有一行代码,显然地我省略了什么?

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

  • What happens now after we've executed this third line of code, what happens next in the story?

    我执行完第三行代码会发生什么呢,在这之后会发生什么呢?

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

  • Having now used this pseudo code to line things up, I can start putting some additional structure on this.

    用伪代码把这些事情串起来后,我可以开始进行,一些结构方面的优化了。

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

  • But there's a key line of code that I lost over a moment ago and that was this one here.

    但是我刚才漏了一行关键的代码,就是这里的这一行。

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

  • It ultimately evaluates that line of code but just once the stuff inside the curly braces, but the semicolon on the end, essentially has the effect of this.

    它最终执行了那行代码,但是只有一次,当那个东西在花括号里,分号放在后面,本质上影响了这个循环。

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

  • And then what I get to do inside the curly braces is literally line by line enumerate the cases that I want to apply to the following code.

    然后我们在花括号中要做的是,逐行地列举接下来我想要,应用的代码。

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

  • I want the function, which is a little tool, a line of code I can include in my own programs and generally those tools live in sections two or three of the manual.

    我想要一个函数,那是一个小工具,在我程序中可以包含的一行代码,通常这些工具在手册的第二节,或第三节。

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

  • We could certainly implement this much more efficiently by just writing this one line of code, but, again, the key here is to take this step toward decomposing our code into chunks of code.

    我们可以写这一行代码,使代码的执行更有效率,但是,这个关键字用来把我们的代码分解,成一段段的。

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

  • Let's assume, for sake of argument, the thing I'm looking for is bigger than this. In that case, I'm going to throw away all of this, I'm going to hit that bottom line of that code.

    让我们假定不是,假定要找的元素,比这个大,在这样的情况下,这些都擦掉,我要运行到代码的最后一行。

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

  • It's deliberate that a lot of the examples in lecture are fairly short and bite-size so that you can actually focus on pulling out the key ideas without getting distracted by line and lines of code.

    很多的演讲中的例子,是短小的,因此你们可以集中于提取其中的主要思想,而不是被一行行的代码给分心。

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

  • Right. So similarly, if you've got one line of code with a semicolon at the end saying, this is the end of the statement, it doesn't really make sense to continue that conversation to try to continue conceptually that puzzle piece with curly braces.

    对的,类似的,如果你得到了一行代码,后面有一个分号,标志语句的结尾,这就没有意义来继续,那个会话来尝试对那段代码,使用花括号。

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

  • Now, we're not quite there because now we have two copies *b=temp of 2 so the last line of code says *b gets temp.

    现在,我们还没有达到目的,因为现在我们有两个2的拷贝,最后一行指明。

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

  • Well, the first line of code, I'll fix the purple next time around so it's more legible.

    第一行代码,我用紫色标记,这样增加了可读性。

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

  • So I actually don't need the curly braces because I only have a single line of code.

    所以我实际上不需要那个花括号,因为我只有一行代码。

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

  • So, I'm getting a string and so what really am I doing in this line of code?

    那么,我得到一个字符串,这行代码实际上是干什么的呢?

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

  • It's okay. So this first line of code, I will get it started but then I'm gonna have you take over and actually instruct Philip what to do here.

    第一行代码就从这里开始,接下来我会让你,接管并指导飞利浦。

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

  • You can imagine having many lines of code where all of a sudden your closed quote is on the next line all the way on the left.

    你可以想象一下,这有很多行代码,突然一个后引号,移到下一行最左边。

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

  • So this first line of code, and some of this again we'll be rehashed but at least you can delight in the awkwardness that is this demonstration.

    因此,第一行代码,有些地方我们需要重新处理下,但至少看到这次,笨拙的演示你会很高兴。

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

  • So in your mind, if you are now the computer program and you are executing this thing from top to bottom, what just has happened verbally is we are stepping into the line of code that says sort left half of elements.

    在你们看来,如果你现在是计算机程序,正在从上到下执行一系列指令,刚才所发生的就是我们现在已执行到了这行代码,它告诉你要对左半部分的元素排序。

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

  • So, what are we really doing in this line of code here?

    那么,这一行代码是干什么的呢?

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

  • temp = *a This line of code here, temp gets *a.

    这一行代码。

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

  • stdio h This file here is called standard I/O or stdio.h and this is just another text file someone else wrote many years ago and by using that line of code there, I'm telling the computer, give me acces to this code that this other person wrote that's in that file.

    在这里的头文件称为标准输入输出文件或,这是由某位前人编写的文本文件,我们只需要刚才所述的一行代码,就能告诉电脑,让我连接到,这个前人在那个文件中写的代码。

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

  • And what line of code am I on now?

    那我现在在伪代码的哪一行呢?

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

  • Well, just this line of code here.

    看到这一行代码。

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

  • So what does this line of code do?

    这一行代码是干什么的啊?

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

  • So really, the rule of thumb if you think back to Scratch is -- that any time you write a statement -- -- something that does something in one line of code -- you generally need the semicolon there.

    实际上,根据经验,你们回忆一下在Scratch中,任何时候你们写一条语句-,处理一些操作的一行代码-,你们通常需要在那里加个分号。

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

  • In temp. So that means at the end of that first line of code just as before the value of 1 ends A up in a variable called temp because we said go to A and I look around, oh, there's A, what's there?

    在temp中,在第一行代码的末尾,值1最终到了叫做temp的变量中,因为我们指明了定位到,并且四处查看,哦,这里是A,里面是什么?

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

  • include stdio h The next line of code says include standard io.h which just as a little sanity check contains among other things, printf.

    接着的一行代码写着,这个库文件包含一些我们常用的函数,譬如,printf函数。

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

  • So, after the second line for code here char * s1 gets the return value of get string this is what the state of our world looks like.

    在第二行之后,这个代码char,*s1,等于GetSting的返回值,这就是它看起来的状态。

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

  • X I'm passing an X, and yet I'm also assigning the return value to X. So just intuitively what's going to be the effect of this one line of code?

    我传一个X,之后我把返回值赋值给,很明显,这一行代码,将会产生什么作用?

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

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

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

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