And if the test is true, it will change the value of this program counter to point to some other place in the memory, some other point in that sequence of instructions, and you'll keep processing.
如果测试结果为真,它会改变程序计数器的结果去,指向记忆存储器里的其他地方,指令序列里的其他地方,然后你会继续这个过程。
What that colon is saying is, I'm about to begin a sequence of instructions that I want to treat as a block.
这个冒号的意思是,下面的一系列的指令,要当做一整块来对待。
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.
我们的目标是得到问题,然后将问题分解为这些计算步骤,这些指令集,可以让我们看到这个过程。
The colon is important It's defining the beginning of a block of instructions. Yes sir.
这个冒号很重要,是因为它定义了,一块指令的开始,有问题么?
Having executed this instruction, that counter goes up by one and we move to the next one.
执行过这个指令之后,计数器升了一级,于是我们开始下一次的运算。
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.
在循环外面初始化它,然后做一个终结测试,然后在循环内部有一个指令集,在这个例子中,就是对余数做检查,然后显示信息,当我完成了整个循环。
Some of those instructions will involve tests: they'll say, is something true?
有些指令需要包括测试:,他们会说,这个东西是真的么?
It ran through that sequence of instructions, in particular it bound x to the value three, x and then it took x times x, got the value of x multipied by x, which of course is nine, bound that to the value of x, and then it printed out the value, and now it's sitting here waiting for an input.
程序按照指令的顺序去执行的,首先是把x和3这个值进行了绑定,然后把x乘以,得到了x乘以x的值,当然也就是9了,然后把x和这个值进行了绑定,然后显示出这个值,然后就等待输入。
应用推荐