• They only need to have values if you care GetInt about getting something back from them, get int, swap you care about its value; but swap, I don't want to hear it again.

    它们只需要拥有值,如果你关心,它们的返回值,你关心它的返回值,但是,我不想再得到它的返回。

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

  • GetInt Let's call her, get int, for today.

    我们今天叫她为。

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

  • Now get int *y so now I'll use the board for things I can't really draw very well with the keyboard so what does the memory of my program look like at the moment?

    现在,=,int,*y,现在我使用黑板,我用键盘画的不是很好,那么此刻,我程序中的内存看起来像什么?

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

  • So we've seen a lot of this, for instance, in office hours and maybe you too have done or are currently doing this, but there's a problem with writing a statement, like print F, followed by, get int, alone.

    我们看过很多这个,例如,在办公时间,可能你们做完了或还在做这个,但是写语句的时候有个问题,就像printf,紧跟着的是GetInt,单独的。

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

  • So Jordan, playing the role of human is going to type or write something down on this piece of paper, GetInt hand it back to, get int.

    所以Jordan,担任人类的角色,键入,或者在这张纸上写下点东西,把它传给。

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

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

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

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

  • You've used get int, get string, or the like perhaps already.

    你们用过GetInt,GetString,或者其他的。

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

  • So we'll talk a bit more about this idea of functions today, but, get int, again, can think of it as a black box, whose purpose in life is to prompt the human for input and pester the human if he or she doesn't actually give it int, but then once it has that, has entered it from the user, it's quote unquote, returns it to you.

    所以我们进今天将多讨论点这个函数的概念,但是,GetInt,我们可以把它当做一个黑盒子,它的唯一目的是提示人们来输入,并且如果他或她没有,给它int数,则会纠缠用户,但是一旦它得到了,用户输入的int数,对输入进行引用,返回给你。

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

  • - 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,她把这张纸给我,但是如果我没有赋值-,不,不,我刚才把这个演示搞乱了。

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

  • I get the int and store it in n. The switch statement takes inside its parenthesis an int or a char or some primitive type.

    我得到一个整数并把它存储,到n中,switch语句的圆括号里可以是一个整数,或者一个字符或其他的基本类型。

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

  • It takes an int; deal with it when you get to it and then once you look through the whole file, should you find -- ultimately find the actual code that defines or impliments this thing.

    它携带一个int数,当你获得了它就处理它,然后一旦你查看整个文件,最终你将发现实际代码中,定义或执行了这个东西。

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

  • And we'll see if you try to mess with our functions by providing a string when we want an int, or providing an int when we want a string, you may very well get yelled at and the user will have to retry.

    我们可以看到,如果你尝试打乱我们的函数,当想要一个int数时我们提供sting型,或者,当想要一个sting数时我们提供int型,你可能会被吼叫,然后用户不得不重新尝试。

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

  • A few of you were probably wondering, "Well, how do I actually get the int from the user?"

    有的同学可能想知道:,“我们怎么通过用户获得那个int数值“

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

  • So what data type can we use to actually get more bits of precision than an int?

    所以我们能用什么数据类型来表示,比int类型更多位数的数呢?

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

  • So your role in here in this demo is to get an int from Jordan.

    所以你在这个演示里面的角色是,从Jordan那里获取一个int数。

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

  • If they type in bogus characters, it's going to yell at them and make them retry, and eventually I'm going to get handed back an int, which I'm storing in n. Well, if I actually want to judge this number based on its magnitude, well, I can say now, "If n is greater than or equal to one."

    如果他们键入了不合法的字符,它将对他们叫喊,然后叫他们重试,最终我将,得到一个int数,它是存储在n中的,好的,如果我的确想要根据它的量级来判定这个数字,好的,现在我可以指明,“是否n大于等于1“

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

  • So that's what it means to get an int.

    所以获得一个int数是什么目的?

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

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

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

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