So let me go ahead and quit from this program.
退出这个程序,我们继续。
So in your mind, if you are now the computer program and you are executing this thing from top to bottom, what just has happened verbally is we are stepping into the line of code that says sort left half of elements.
在你们看来,如果你现在是计算机程序,正在从上到下执行一系列指令,刚才所发生的就是我们现在已执行到了这行代码,它告诉你要对左半部分的元素排序。
Three years from now, that is after the next president has had time to enact this program and the program has had some time to begin taking effect will the number of illegal immigrants in the United States be higher, lower or about the same? Ken Judd.
年后,这期间,下届总统有可能制定相关法案,而该法案刚好也已经生效,美国境内的非法移民,是增多,减少还是持平?,肯·贾德你先来。
The beauty of this is, it keeps me from getting lazy, and not only testing my program and the thing that found the bug, but in all the things that used to work.
运行函数而不用再输入了,这其中的,美妙之处在于,它让我变的勤快了点,并不是仅仅的去测试程序发现bug方面,同样适用于那些正常工作的模块。
So now let me recreate this program from memory.
现在我们在脑子里再过一遍这个程序。
Now this program's a little different from what we saw before because it's obviously not gonna say oh, It's going to say oh, hi David presumably.
大家可以看到,这个程序和之前的,颇有不同,不再是单纯地,它可能会显示“oh,hi,David,“
I'm going to use the CS50 Library instead for user input I'm saying say something then I'd get a string from the user and I call time s1 and then I say, say something, s2 and then I get another string from the user and call it s2 and apparently this program's purpose in life is to tell me yes or no the user said the same thing both times.
然而我使用的是CS50库来获得用户输入,我说点什么,然后从用户那里获得一个字符串,并把它叫做s1,然后我说点什么,然后从用户那里获得一个字符串,并把它叫做2,这个程序的最终目的是,告诉我两次用户输入的是不是同样的东西。
应用推荐