• But it's a valuable thing. It says, in each case, I return some useful value from this procedure.

    但是这就是变量,是每个例子中,从这个程序中返回了一些有用的值。

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

  • I can use that to return values, which I can then use elsewhere, which I did-- and if I just come back and highlight this-- inside of that computation.

    可以用它来返回值,然后可以别的地方使用这些返回值,正是做的--如果回过头来,高亮一下这个--这部分计算内部。

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

  • 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,一个为。

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

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

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

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

  • In either event, if I'm looking at the last element, I return.

    这两种情况中,如果是最后一个,元素的话返回

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

  • Now let me spend just a second to say, what was this actually doing?

    如果这里这么做-啊,它返回了值?

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

  • So I can return true here.

    所以可以这儿返回真值。

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

  • It says, if I want to print out something I built in Cartesian form up here, says, again, I'm going to pass it in a pointer to the instance, that self thing, and then I'm going to return a string that I combine together with an open self and close paren, a comma in the middle, and getting the x-value and the y-value and converting them into strings before I put the whole thing together.

    这不仅仅是个列表,它是怎么来做的?,流程是:如果想要返回,一些已经笛卡尔模式下建好的值,好,再说一遍,首先要传入一个,指向实例的指针,也就是,然后返回一个,由开括号,闭括号,中间的一个逗号,以及提前转换为字符串格式的。

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

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

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

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

  • All right? So if I called sqrt alone, that return test value is done, but in this case I bound it to test, so I can go look at test, and there it is.

    执行完返回值语句,但是这里将把它赋值给,所以当看test的值的时候就是返回的值。

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

  • 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
- 来自原声例句
小调查
请问您想要如何调整此模块?

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

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