What happens now after we've executed this third line of code, what happens next in the story?
我执行完第三行代码会发生什么呢,在这之后会发生什么呢?
I want the function, which is a little tool, a line of code I can include in my own programs and generally those tools live in sections two or three of the manual.
我想要一个函数,那是一个小工具,在我程序中可以包含的一行代码,通常这些工具在手册的第二节,或第三节。
So, I'm getting a string and so what really am I doing in this line of code?
那么,我得到一个字符串,这行代码实际上是干什么的呢?
So, what are we really doing in this line of code here?
那么,这一行代码是干什么的呢?
So really, the rule of thumb if you think back to Scratch is -- that any time you write a statement -- -- something that does something in one line of code -- you generally need the semicolon there.
实际上,根据经验,你们回忆一下在Scratch中,任何时候你们写一条语句-,处理一些操作的一行代码-,你们通常需要在那里加个分号。
In temp. So that means at the end of that first line of code just as before the value of 1 ends A up in a variable called temp because we said go to A and I look around, oh, there's A, what's there?
在temp中,在第一行代码的末尾,值1最终到了叫做temp的变量中,因为我们指明了定位到,并且四处查看,哦,这里是A,里面是什么?
b Star B in the last line of code now means find B, 1 2 3 all right, that's 1, 2, 3.
在最后一行的*b意思是查找,好的,那是。
But what looks like this orange block as of now in Scratch, add orange to your so called inventory, well, it's gonna take at least two lines of code in C to actually create the inventory array with this first line and then put something like the word orange inside of it.
就好比Scratch里面橘色的这一块,把“桔子“加到所谓的“清单“里面去,在C语言中至少需要两行代码来实现,第一行代码创建一个货单数组,第二行就需要把“桔子“放进去。
As an aside, if you ever just have one line of code that you want to execute, one puzzle piece in Scratch terminology, ; you actually don't need the curly braces; you only need the curly braces if you have two or more lines of code that you want to execute if that condition is true.
此外,如果你只有一行代码,需要执行,在Scratch,术语中叫做,一句代码,你就不需要使用花括号了;,如果那个条件成立,你有两行或更多行的代码时需要执行时,你就需要花括号。
应用推荐