It's, and in particular, the colon is the start, and the carriage return is the end.
尤其是,冒号是开始,回车意味着这块指令集的结束。
I'm thinking about a problem, I'm going to show you an example in a second, first thing I'm going to do is say, what is the thing that's going to change every time I run through the same set of code?
我要解决一个问题,我马上会让大家看一个例子,第一件我要做的事情就是,弄明白每次运行同样的指令集时,每次都会改变的东西是什么?
And I want to remind you, that block of code is a set of instructions, the same set of instructions that are going to be done each time through the loop.
我想提醒大家,这块代码是一个指令集,一个每次循环都会被执行的相同指令集,会变化的仅仅是变量的值。
Our goal is to take problems and break them down into these computational steps, these sequence of instructions that'll allow us to capture that process.
我们的目标是得到问题,然后将问题分解为这些计算步骤,这些指令集,可以让我们看到这个过程。
And when I'm done with the whole thing, before I end the increment of the variable, you know, when I'm done, I'm just not returning anything out.
在循环外面初始化它,然后做一个终结测试,然后在循环内部有一个指令集,在这个例子中,就是对余数做检查,然后显示信息,当我完成了整个循环。
So it identifies a block of instructions.
因为它表明了一块指令集。
That is followed by a block of instructions.
然后后面是一块指令集。
And we have an ELSE, followed by a colon in some other block of instructions.
然后是一个ELSE,后面跟着一个冒号,然后是一些其他的指令集。
应用推荐