Third thing to notice is, there's a flow of control. The order which these things are going to happen.
第三件事情就是,我有一个控制流,这些事情有个要做的先后顺序。
And get into the habit of using it to help you define what is the flow of control.
然后是养成用伪代码,来帮助你定义控制流的习惯。
We decrement so to speak the variable and then where will we go next in terms of the flow control, the flow of this program.
可以这么说,我们递减这个变量,然后按照控制流,即程序流进入到下一语句。
We try to be--I think investing is about clipping coupons, about getting cash flow and getting and controlling cash flow, but there are good resellers.
我们试图-我认为投资就是关于获得票息,关于得到现金流,和控制现金流,但是我们也有好的经销商。
So let's look at a little example, and this is going to, excuse me, both allow us introduce the syntax as well as what we want to have as the flow of control inside of here.
让我们看个小例子,这个程序会,对不对,请允许我,一边顺着控制流进行,一边讲解语法。
What that basically says is the following: in an interpreted language, you take what's called the source code, the thing you write, it may go through a simple checker but it basically goes to the interpreter, that thing inside the machine that's going to control the flow of going through each one of the instructions, and give you an output.
也就说,如果是解释语言的话:,你要写一些叫做,源码的东西,你写的东西会经过一个简单的过滤器,然后解释器会处理你的源码,解释器会产生一个,逐条读取你的源码的,控制流,然后返回一个输出结果。
So the way to think about this in terms of flow is, it starts with that if and it says, check both of those things.
因此用控制流的方式,来考虑这件事就是,程序由if开始,然后要对两件事情,都进行检查。
应用推荐