an interpreted language is often easier to debug, because you can still see your raw code there, but it's not always as fast.
解释语言调试起来很容易,因为你可以看到最原始的代码,但是这种语言不够快。
Today, I'm gonna start writing C code with you but I can't just write it and expect it to do anything.
现在,我和大家一起写C语言代码,但我不指望写出来后就能跑起来。
I should also warn you that this code includes some Python concepts, at least one, that you have not yet seen.
我得事先说明这个代码中,包括了一些你没见过的Python语言的概念,至少一个。
Pseudo code. Now, you're all linguistic majors, pseudo means false, this sounds like code that ain't going to run, and that's not the intent of the term. When I say pseudo code, what I mean is, I'm going to write a description of the steps, but not in a particular programming language.
伪代码,基于你们都是学语言的,伪代码意味着不正确,这听起来就像是没法运行的代码,这可不是我们学这个的目的,当我说到伪代码的时候,我的意思是要对步骤进行一个描述,而不是某种特定的编程语言。
And generally in this language called "C" as well as a lot of others, almost all of your lines have to end with semicolons, but not all; just almost all and we'll see the difference.
通常在这个“C“语言中,像其他的语言一样,几乎所有的你们的代码行都要以分号结束,但不是所有的,只是大部分的,我们将看到他们的区别。
With C you can just line everything up on the left here because it's just text.
用C语言,你只要把代码排在这里的左边,因为只是文本。
So you have to somehow convert the source code, the C code into 0s and 1s and for that process there exist this tool called a compiler that someone else wrote that takes this stuff as input and produces this stuff as output.
所以你必须把源代码,即C语言代码转换成二进制文件,这个过程就需要我们提到的编译器了,它是由别人编写的一个软件,以这些代码作为输入,将会产生的输出。
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语言中至少需要两行代码来实现,第一行代码创建一个货单数组,第二行就需要把“桔子“放进去。
So here is the simplest program which is perhaps an ironic statement that you can implement with this language called C. So it takes a few lines of code to actually get something up and running and as you'll recall last Friday, I didn't even get this up and running because part of the process of writing a program is to one, write it.
让我们回到这个最简单的程序,你们也许觉得啼笑皆非,这么简单的例子,用C语言写出来就可以了嘛,的确只需要几行代码,就可以让这个程序跑起来,就像上周五的那样,我之所以没让它跑起来,因为编程步骤之一,就是“写“
应用推荐