The syntax is OK in the sense of, it is an operand, an operator, an operand, so syntactically it's OK.
这里的语法应该是好的,有个运算对象,一个运算符,另外一个运算对象,因此语法上是没错的。
OK. In the length of time it takes for the light to get from that bulb to the table, this machine processes two operations.
好,在灯光从灯泡到,桌子的这段时间内,电脑已经进行了两次运算了。
It turns out not, but it does evince the fact that we have some basic syntax like mathematics and equal signs and whatnot with which we can now start using for more useful purposes.
结果不是那样的,但这的确有个事实,我们有些基本的运算法则和等号和,其他一些东西,用来为我们一些,更多有用的目的而服务的。
The mind reflects the workings of the brain just like computation reflects the working of a computer.
心理反映了大脑的活动,就像运算结果反映了计算机的运行一样
Again, don't worry too much about the equation, we're not really going to do any math here, I'm just putting it in for completeness.
对这个方程也不需要太深究,在这里我们不强调数学运算的,我把它写出来是为了表述完整
This is a matter of simple algebra, of taking this and putting it here.
本质上讲,这是简单的代数运算,把这个式子代入上面的式子
That's all the basic math that we need.
这就是我们用到的基本运算。
Reconfigure itself, emulate it, however you want to use the words, it's going to change how it does the computation.
重新配置它自己,模仿它,但是你想用一些文字,这就会改变它运算的方式。
The real issue is to figure out how to build constructs out of this that tackle particular problems, but the fundamental basics of computation are just captured in that set of mechanisms.
坏消息是当然这不是真的,真正的问题是怎么来,构建解决特定的问题的这些结构,但是运算的最基本的东西,仅仅体现在机制集里。
- And here as promised is that other operator -- looks a little weird, but because assignment is already using the equal sign to assign one value on the right to a variable on the left.
在这里正像所承诺的那样,其他的操作-,看起来有点怪异,但是因为“=“已经被用来当赋值运算符了,用来把右边的一个值赋值给左边的变量。
The reason I say that is, by having operator overloading I can use 1 generic interface to all of the objects that I want to use.
他在大多数情况下都是对的,我要这么说的原因是,通过运算符重载我可以,用一个通用的借口对。
A gig is 10 to the 9, so it does two operations in the length of time it takes light to get from one foot off the table down to the table. That's amazing.
因此光行进一英尺的,时间内电脑可以,进行两次基本运算,这太神奇了。
So, I'm now multiplying by the result of calling the size of operator, which we've seen before.
现在我乘以运算符的大小,之前我们看到的。
Do what you normally do with ordinary numbers.
就按照通常处理数的运算的方法去做
Just as in grade school when you're doing division and multiplication, you do it from left to right in terms of order of operations.
正像是在小学你做除法和乘法的时候,你毫不含糊地从左到右,按顺序做运算。
You're going to get a chance to explore them, and you'll see not only are there the standard numerics for strings, there are things like length or plus or other things you can do with them.
以后你们还会学到更多,你会学到字符串,不仅仅能运用标准数值运算,你还可以对他们求长度,或者加上其他的东西。
And that's what they would do: they would do that specific computation.
那就是它们能做的事儿:,它们能做那个特定的运算。
How is it attempting to work?
它是怎么完成运算的?这个程序现在?
We know what all those operations mean now.
我们已经明白了这些运算的含义
So, it's an extraordinarily complicated computing device.
所以这是个极端复杂的运算器
And the problem is, that we want to build this abstract data type, but we'd like to basically know what kind of object is it, and what functions actually belong to it, how do we use them?
然后我对它们运行了这个方法,就是这一小段代码这个方法,这有意义么?,当然没有了,对不对?,因为你知道,当你把两个极坐标,表示的点进行相加运算的时候?
The semantics was what caused the problem, because the operator was expecting a particular kind of structure there.
引起问题的是语义,因为运算符需要的是,一种特定种类的数据结构。
STUDENT: What does it mean, the operator used, when you were calculating the remainder between nine and five?
学生:这是什么意思,当你用这个运算符去算,9除以5的余数的时候?
STUDENT: Standard order of operations, I guess take the multiplication first, and add the three.
学生:标准运算符的顺序,我猜是先做乘法,然后再去加3。
All right, again this is straightforward kind of algebraic manipulations to get here.
好,必须再提一次这已经是,直截了当的代数运算了。
Let's suppose n is 1000, and we're running at nanosecond speed.
假入我们一秒钟运算十亿次,我们已经看过了对数级,线性增长的。
You could use a calculator or any number of other tools but we'll get there.
我们可以用一个计算器或,其他的运算工具来计算那个结果。
And again, you've got to be careful about how you use the operators.
再提醒一次,你们用运算符的时候,要多加小心。
You know, you can do the simple numbers, right?
你知道那种简单数字的运算的,对不对?
Especially in the presence of operator overload.
尤其是运算符重载,这种情况出现的时候。
应用推荐