让我们来试试更加有趣的,一些事情吧,然后,我们再去写一些简单的小程序。
So let me just to try something a little more interesting, and then we'll get to writing some simple programs.
我们写这些宏不是为了自娱自乐-我们是个小创业公司,我们必须疯狂写程序,这样才能与竞争对手之间构筑技术上的壁垒。
We weren't writing this code for our own amusement. We were a tiny startup, programming as hard as we could in order to put technical barriers between us and our competitors.
最后他将发现,他写的小应用程序代码缺少缺省的构造函数。
Eventually she will figure it out: Her code is missing the default constructor for the applet she is writing.
So let me just to try something a little more interesting, and then we'll get to writing some simple programs.
让我们来试试更加有趣的,一些事情吧,然后,我们再去写一些简单的小程序。
So I am going to on the fly write a very simple little main program that just illustrates some of the syntax that we can then visualize more interesting.
我很快的写了一个很简单地小程序,来说明一些语法,我们使它变得更有趣些。
So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.
好,为了来认识到这一点,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我写了一个小程序,它假设我得到了,这些点中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个点,我会再创建一个数组。
应用推荐