• The only thing that you have to put in the function prototype, ; again, is three things; one, the name of the function; the return value; and its arguments.

    你唯一要加入到函数原型中的东西,是有三个东西,一,函数的名字;,返回值,它的参数。

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

  • It says, well I'm going to print out first and last just so you can see it, and then I say, gee 2 if last minus first is less than 2, that is, if there's no more than two elements left in the list, then I can just check those two elements and return the answer.

    然后它计算了尾点开始点的差,如果小于2的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值点,注意它是怎么实现的,首先这个指向一个列表的开头。

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

  • Two, the arguments or parameters, and three, is the return value.

    第二个,参数参量,还有三,是那个返回值。

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

  • Then you get successively deeper, II through IV, slow, irregular, high amplitude delta waves, and then once you reach stage IV you start going up again, up through stage III and II.

    然后睡得越来越深,从第二到第四阶段,慢,不规则,高振幅的δ波,等你到达第四阶段,你又开始返回,第三阶段第二阶段。

    耶鲁公开课 - 心理学导论课程节选

  • So I want to go back again, now we're considering the line on the board as being flavor in beer, or location in a town, and I want to go back to politics now and go back to the interpretation we started with, so that left and right will end up being left-wing politics versus right-wing politics.

    所以我想返回去,现在我们将黑板上的线看成,啤酒的口味或城市的位置,我现在再回去讨论政治,回去解释我们最初,把线的左边右边,看成左派右派的原因

    耶鲁公开课 - 博弈论课程节选

  • And then when I get to the very end, I'm going to return the bigger of with i and without i.

    然后当我到最后时,我会返回包括i物品,不包括i物品的,总价值中的较大值。

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

  • p1 But if I say, are p 1 and p 2 the same point, it says yes.

    p2是不是同一个点,It,says,no。,返回的结果是肯定的,在这里我有个要强调的点,这个例子里发生的是。

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

  • Again I should have said first, index 0, the first one. I can similarly go in and say I'd like all the things between index 2 and index 4. And again, remember what a b c that does. Index 2 says start a 0. 1, 2. So a, b, c.

    我还是要说一遍,索引为0的元素,是第一个元素,我可以要求返回索引,24之前的所有元素,请记住2,是从0开始的,那么0,1,2对应的是。

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

  • Knowing that, I'm going to say, OK, how many pigs are there, well that's just how we're, however many I had total, minus that amount, and then I can see, how many legs does that give, and then I can check, that the number of legs that I would get for that solution, is it even equal to the number of legs I started with, ah! Interesting. A return.

    它将给我返回头的总数,知道了这些之后我可以说好了,有多少猪呢,无论有多少组鸡的数目,我只要用总数减去那个值,之后我就可以知道一共有多少条腿,然后再把这个值题目中的腿数相比较,看它是否等于一开始的腿数,啊!真有趣,有一个返回值。

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

  • So functions and return values.

    函数返回值。

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

  • x and get the values of x and y attached to this thing and return them to me.

    y值然后把它们返回给我,It’s,going,to,go,off,这就是我想要的东西,我想要我的类里面有一些方法。

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

  • And I think in the polar one I said, if, what did I do there, I said, yeah, again if the x and y are greater than the other one, I'm going to return them to it.

    然后我要返回一些值,我认为在极坐标的形式下我说过,如果,我在这里做了什么来着,我说过,对,再说一次,如果xy坐标。

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

  • And actually, if I don't want to clobber, as we say, overwrite the value of my variable, ; I could declare another one and store the return value in Y; Y so now I have two ints in memory; X and Y, 3 one with two, one with three.

    实际上,如果你不想彻底清除,像我们说的,覆盖那个变量的值,我可以申明另一个变量Y,并在Y中保存那个返回值;,现在内存中有两个int数,X,一个的值为2,一个为。

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

  • And it treats it as a string, it's simply getting me back 52*7 the value of that string, 52 times 7, rather than the value of it.

    这让Python把它当做字符串来对待,他返回给我了,一个字符串的值,而不是这个数的

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

  • You have to with C, as with a lot of programming language, say what you return.

    在C语言大部分语言中,你必须说明函数的返回值。

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

  • So I don't know don't, John, I would argue if I'd written this better, I would have had a method that returned the x- and the y- value, and it would be cleaner to go after it that way.

    我会去辩论这么写是不是更好,我也可以写一个,返回x坐标y坐标的方法,这么做可能会更清楚一点,这是很棒的缩写,好。

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

  • argv Recompile my program, and now rerun Arg V of foo and bar.

    重新编译我的程序,现在返回foobar的。

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

  • So the question was, why is this return down at this level, it says, well if I ever execute out of this FOR loop, I get to the end of the FOR loop without hitting that branch that took me through the return, then and only then do I want to actually say, gee, I got to this place, there isn't any value to return, none I'm going to return none and none.

    问题是,为什么它是在这个级别上返回值呢,意思就是如果我出了这个for循环,就意味着我运行的过程中没有走到任何,带return的支路上去,这时也只有这时我才能说天呐,我终于走到这儿了,这时不会返回任何值,只会返回none

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

  • Instead I'm going to be expecting the address of some int and the address of another int and thanks to this address I can literally find this address in RAM, do anything I want there, -- return and what I've just done is actually changed or mutate the values of those original variables.

    我们所期望的是int型地址,另外一个int型地址,幸亏这个地址,我可以找在RAM中找到它的地址,然后做我想做的事情,返回我处理后的东西,我可能改变了这些源变量。

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

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

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

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