• are all functions of state and parameters that we can control like temperature and pressure.

    公式里面的全部都是态函数,我们控制态函数参数比如温度或者压强。

    麻省理工公开课 - 热力学与动力学课程节选

  • But this choice of names, both for my functions and also for my parameters or my variables is completely up to me.

    但是这个名字的选择,包括我的函数名,和我的参数名,或者变量名都是我定义的。

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

  • I can have functions with no parameters, that's fine, I will still need the open and close paren there to identify that I have no parameters.

    我每次都需要进行输入码?,函数可以没有参数,我依然需要前后括号,来定义我没与参数

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

  • And when you declare a variable, whether as an argument or as literally a local variable, they only live inside of that function.

    当你声明一个变量,不论是一个参数,还是一个局部变量,它们只存在函数的内部。

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

  • If you want it to take a so-called argument or a parameter, there's a subtle semantic distinction between arguments and parameter, but for all intents and purposes, they're the same thing.

    如果你想要你的函数携带参数或,参量,这里有一个微妙的语义差别在,参数和参量之中,但是为了所有的意图,和目的,他们作用是一样的。

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

  • When you think about an int or a float or a dictionary or a list, you knew that there were functions that operated on them.

    当你想到整型,浮点型,或者链表时,你知道可以用函数去处理他们,但是当你传递一个参数,例如链表。

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

  • I'm actually just going to do something simple first, print the arguments to this function.

    我实际上将要先做点简单的东西,打印函数参数

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

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

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

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

  • But it turns out that as we'll see that functions absolutely take arguments, right?

    但结果是我们将看到,函数绝对是有参数的,对不对?

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

  • An argument or a parameter is an input to a function.

    参数或参量是一个函数的输入。

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

  • The parentheses to pass in inputs or arguments to functions.

    圆括号是用来传函数的,输入或参数的。

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

  • In some sense, strictly speaking they shouldn't be necessary because the fact that my specification starts with an assumption, says, hey you, who might call square root make sure that the things you call me with obey the assumption.

    在某种意义上严格的来讲,它们不是必要的,因为我已经对假设做了声明,也就是说,如果你要调用我的,求平方根的函数,请确保你传递给我的,参数满足假设条件。

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

  • What is this? This is a wonderful piece of abstraction. It is saying, you don't need to know squat about what's inside the body of this function. You don't have to worry about the parameter names, because they're going to be preserved, you don't need to worry about how I'm doing it, this tells you how you can use this, in order to use it correctly. Of course, I can then close it off, and off we go.

    但是这能告诉你一些信息,这是什么?,这是一段完美的抽象,它的意思是你不需要知道,这个函数的内部构造,你不必担心参数是否重名,因为它们已经被预存了,你不需要担心我如何使用它,它告诉了你你该如何操作,从而正确的使用它,当然我也可以把它关掉。

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

  • It then should take an argument or parameter if you want your function to take input.

    然后它必须携带一个参数或参量,如果你想要你的函数获得一个输入。

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

  • And we've only just begun using it, but it has just a bunch GetInt GetString GetDouble of very useful functions like GetInt, GetString, GetDouble, And so as those names imply, you can just cull these functions with no arguments and you'll get back that data type based on its name.

    我们刚开始使用了它,里面有很多的,有用的函数,像,所以,那些名字暗示,你可以挑选这些,没有参数函数,然后你可以通过它的名字,获取他们的数据类型。

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

  • Now if you call a function, swap like increment or cube or swap, or in this case, foo, those variables are the parameters to that function, end up getting stored next in memory.

    现在如果你调用一个函数,像increment或者cube或者,或者在这个例子里,foo,这些变量都是,函数参数,在内存中存储。

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

  • int A Well, one, function has called swap, takes one int called A, printf followed by another int called B, and as we've seen with print F, if you have multiple arguments, you separate them by commas.

    好的,函数叫做swap,一个参数是,另一个参数是int,B,我们看到的,如果你有好几个参数,把它们用逗号分开。

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

  • But it's the really correct way to specify that this function takes no arguments is to actually write this key word "void."

    但是这的确是正确的方法来指明,这个函数是没有参数,实际上是写了这个关键字“void“

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

  • Well, you don't have to just take what you've been handed round in life, functions like print F or round or maybe other functions you've seen in super sections or by poking around.

    好的,你没必要把传给你的参数保存起来,像函数printf或者,或者你们看到的其他的函数,在超级课程中或闲逛的时候。

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

  • Think of this as a function that takes two techs arguments, the first of which is univs and the second of which is techs. And this is just a different syntax for writing that function call.

    想下有两个参数函数,第一个是univs第二个是,这就是对于函数调用的,不同语法的书写规则。

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

  • First of all, two parameters. It's OK. All it says is, when I call this, I need to pass in two parameters for this to work. All right? Now, if I want to use that, I'm going to use a second piece of code here, called Barnyard. I'm going Barnyard to read in a couple of values, convert them into integers, and then I'm going to use solve to get a solution out.

    注意我得到了什么,第一,两个参数,它的意思就是我调用这个函数,我得给它输入两个参数,明白了吗?,现在如果我要使用它我得用,这里的第二段代码,也叫,我将读入一组值,将它们转化为整型,然后我会用solve得到一个解决方案。

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

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

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

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