可能会有人走到舞台上,说:“在美丽的维罗纳,我们的故事在这里发生!”,然后讲述关于罗密欧与朱丽叶两家不和的所有故事。
Someone might walk out on a stage and say, "In fair Verona where we lay our scene!" and then tell all about the feuding families of Romeo and Juliet.
这里说,要加水,然后加热混合物制成纸浆。
It says water is added and then the mixture is heated and made into pulp.
然后像往常许多次那样,我解释说,“我的祖父在19世纪80年代从中国来到这里。”
Then I explained as I had done many times before, "My grandfather came here from China in the 1880s."
And is able to then say, inside of that class definition, find the value of x.
这个类的定义这里然后取值,也可以这么说,在类的定义的里面。
But notice what this does. The first thing it does is, it says, let's check and make sure x is greater than or equal to 0. If it isn't, notice what's going to happen. None of that block is going to get executed, and it's going to come down here and print out a useful piece of information, which says, hey, you gave me a negative number. I don't know how to do this.
做的是和以前一样的事情,但是注释它做了什么,第一件做的事情就是,程序说,要去检查并且确信x是大于等于0的,如果不是的话,请注意会发生什么,下面的代码都不会被执行,程序会到这里来然后显示一些有用的信息,信息会说,嘿,你给了我一个负数,我不知道该怎么弄这个了。
应用推荐