Using atoms in this way also extends to Boolean logic, with the availability of true and false atoms to identify the Boolean result of a statement.
还可以将原子值的这种使用方法扩展到布尔逻辑,利用原子值true和false来标识语句的布尔结果。
The if statement supports an optional else clause that indicates a block of program statements that should be processed if the Boolean expression evaluates False.
if语句支持一个可选的else子句,指示当布尔表达式计算为False时应该处理的程序语句块。
Up to this point, you've seen how the if statement can be used to execute one of two blocks of program statements, depending on the value of a particular Boolean expression.
至此,已经看到了if语句可以如何用于根据一个特定布尔表达式的值,来执行两个程序语句块中的其中一个。
应用推荐