Anything that tells him to sense something like the user's mouse or the edge of his screen is actually purple in color; and so they're nicely colorized and all this but the one that's adventurous right now is this.
能够让计算机感知鼠标或屏幕边缘的图块,都是紫色的;,这些图块五颜六色,但这里有一个不太靠谱的按键。
So, summarizing better, assert is something you put in to say to the user, make sure you're giving me input of this type, but I'm going to guarantee you the rest of the code works correctly. Exceptions and exception handlers are saying, here are the odd cases that I might see and here's what I'd like to do in those cases in order to try and be able to deal with them.
所以更好的总结下,断言就是你放在那里告诉用户,保证你输入的是这种类型的,但我能保证剩下的代码运行正确,异常和异常处理做的事,这里有些我能预期的异常情况,并且这里有些情况,我能尝试处理。
Even those of you who've taken AP computer science or something similar perhaps recall that even just getting a piece of input from the user is ridiculously not obvious.
你们中上了AP计算机科学这门课,或者类似的课程的人可能还记得,即使只是从用户那里得到一个输入,也相当麻烦。
But GetString as its name implies is supposed to get something from the user.
照这么说来,GetString按字面意思解释,就是--从用户那里获取一些东西。
应用推荐