In a compiled language, you have an intermediate step, in which you take the source code, it runs through what's called a checker or a compiler or both, and it creates what's called object code.
而在编译语言里,你就会经过一个中间的步骤,在这种语言里输入源码后,先经过过滤器,或者编译器检查后,它会创建一个叫做目标代码的东西。
OK. All right, let me show you one other tool that I want to use. Which is, I've written that piece of code, I ought to check it. Well, I could just run it, but another useful thing to do is, I'm, especially as I want to debug these things, is to simulate that code.
好,那么,让我给大家讲下,我想用的另外一个工具吧,也就是,我已经写好了这一块代码,我应该去检查检查,那么我可以去运行它,但是特别是当我想要调试代码的时候。
It says check to see if I'm in that base case.
这段代码是检查目前是否是最基本的情况。
So now, in this case, this code is going to, when we get here, check, and if you haven't seen that strange thing there, that exclamation point in bang computer-ese called a bang, it says x if ANS star ANS is not equal to x, all right?
那么现在,在这个例子中,当我们执行到这里,代码会去检查,如果你没有看到过这个奇怪的东西,这个感叹号在计算机学中被叫做,代码的意思是如果ANS的平方不等于?
Well, now I go through code very much like what I did for max val in the first place. I check whether it's 0, et cetera, et cetera.
现在我会捋一遍代码,就像我之前捋maxval函数一样,我会检查它是不是0等等等等。
应用推荐