• And if it returns a value, you've got to do something with that return value too, much like we did up here.

    如果它返回了一个值,你便用那个返回值,做一些事情,就像我们刚在上面做的。

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

  • I don't have to go read what it printed out in the screen. This has returned a value that I can use. Because I could do a test to say, is this a return value? If it's not, I'll do something else with it. So the binding is still there, it simply doesn't print it out.

    我不想读到屏幕中打印出来的这行字,程序返回过一个我能够使用的值,因为我可以做个小测试,来说明这是否是返回的值,如果不是,我可以做一些其它的事,而这个绑定依然在这儿,没有打印任何东西。

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

  • The prototype is just its return value, its name, and its arguments, if any.

    原型就是他的返回值,它的名字,它的参数之类的。

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

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

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

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

  • And it's up to me to put that return value in a variable.

    那个放在变量中的值是取决于我所赋的值。

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

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

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

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

  • Literally, return the control from this function, and take the value of the next expression, and return that as the value of the whole computation.

    正如字面意义上说的,从这个函数返回,然后取得下一个表达式的值,并把这个值作为整个计算的结果返回。

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

  • 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的返回值,这就是它看起来的状态。

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

  • If GetInt's return value is greater than zero, what do, in plain English?

    如果GetInt的返回值比0大,该干什么,用简单的英语说?

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

  • > Yes. You don't actually store the return value of, get int.

    >,是的,你实际上没有存储GetInt的返回值。

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

  • - So now if Christiana doesn't actually -- if either programmer or who's programming these little puzzle pieces, don't actually do anything with this return value, and I call, get int, she wants to hand this piece of paper -- to me, but if I don't actually assign -- no, no, I just messed up the demo.

    现在如果Christiana没有-,如果程序员或谁在编写这段代码,不要对这个返回值做任何事情,我调用GetInt,她把这张纸给我,但是如果我没有赋值-,不,不,我刚才把这个演示搞乱了。

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

  • So you're implementing this black box, and if its purpose in life is to actually return a value, you have to tell the compiler what kind of value to expect, and this is going to have ripple effects.

    你在实现这个黑盒子,如果它的目的是,返回一个值,你必须告诉编译器你期望的是什么类型的值,这个将是一个连锁反应。

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

  • Then if the weight of i is less than the available weight, I can return the value of i.

    然后如果i的重量,小于剩下的重量,我将返回i的价值。

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

  • - Then you declare a float called f and then assign it -- -- let me scroll up for the folks in front -- that give return value of GetFloat.

    然后你声明一个float类型f,再赋值-,让我向上为你们回滚到-,给出了GetFloat的返回值。

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

  • And the reason that we now on the second line have the equal sign is because this function GetString has what's called a return value.

    我们之所以,在第二行代码GetString前面加上等号,是因为这个函数会带回一个,返回值。

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

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

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

  • Well, the return value of toupper so that literally changes this.

    好的,toupper的返回值,也就改变了这个。

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

  • I check the return value of GetInt is greater than zero.

    我检查了GetInt的返回值比0大。

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

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

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

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

  • It will return me some random value from either the Gaussian or the normal distribution.

    它会给我,返回符合高斯分布。

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

  • And then the only other difference is obviously, it's a function I need to return a value.

    然后还剩下一点明显的区别,对于方法我要有返回值。

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

  • minus volatility to plus volatility it will return any value in here.

    浮动值到+浮动值之间等概率地,去返回一个值。

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

  • Except, before I return the value, I save it.

    除了我再返回之前,还保留了这个值意外。

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

  • I try and return the value.

    我会尝试返回这个值。

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

  • It's defined in CS50's library; its sole purpose in life is to ask the user for a floating point value and return it.

    它被定义在CS50的函数库中,它的唯一目的是,向用户询问一个浮点数的值,然后返回它。

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

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

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

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