The most basic form of information, Shannon argued, is whether something is true or false—which can be captured in the binary unit, or "bit", of the form 1 or 0.
香农认为,信息最基本的形式是判断事物的对错——这些信息可以用二进制单位或“位”来表示,形式为1或0。
The only slightly unusual function is read_yes_no(), which can be given a Y or 1 default parameter to make the default true, and any other parameter to make the default false.
惟一一个稍微与众不同的函数是 read_yes_no() ,可以给它一个 Y 或 1 的默认参数来使默认值为真,任何其他的参数都会使默认值为假。
If $userchoice is false (see Table 1), then Perl checks the value of $systemchoice and so on until it gets to the last value, which is always used, whether it's true or not.
如果 $userchoice 为假(请参阅表 1),那么 Perl 就需要检查 $systemchoice 的值,依此类推,直到最后一个值,这个值通常都会被使用,不管它是真还是假。
This is just a little inelegant and so one of the things we'll introduce early on is this idea of abstraction or design whereby if you wanna represent the ideas of 0 and 1, true or false, well, let's give them a synonym like true or false.
这么说有点粗野,我要接着讲的是这种抽象的思想,或者用这个来描绘设计出,真和假的思想,我们可以给真假各指定一个同义词。
应用推荐