Did you just Copy and Paste 50 times when you could have just used a loop that cycles 50 times?
你是不是复制粘贴50次,当你可以用一个循环来循环50次呢?
For instance, if I wanted to change the sound that the cat is making, my God, now I have to change it on three places but like 30 places if all I've done is copy and paste.
举个例子,假如你想,改变猫的叫声,我的天啊,你现在必须改变三个地方,但是,我做了30多次复制和粘贴。
So it's pretty much Copy and Paste.
所以这大部分都是复制粘贴。
So, main meanwhile is going to change, but let's fast forward to the end just to confirm that all I did was copy and paste what was on the slide a moment ago.
所以,main同时要改变,快速翻到末端,来确认,我刚才所做的就是,在面板上复制粘贴。
But let's suppose that I realize that I'm doing a lot of addition in my programs, and I actually want to factor out what seems to becoming a lot of copy, paste.
但是假如我在程序中做了很多加法,我实际上想要提出那些,复制粘贴的东西。
long l So let me try this, long l, and then let me do a little Copy Paste here and say a long is actually the size of l. So let me quit that program; recompile.
让我们来试一下,然后我在这里复制粘贴一下,这里long的大小实际上是l的大小,所以让我退出,那个程序,重新编译。
应用推荐