Overview | Statement List | Example 1 (OR) | Example 2 (AND)


逻辑IF布尔运算符

Synopsis

IF/(and,or,not)

Description

This statement may consist of either a simple or a compound expression. All of the logical IF statements covered to this point have consisted of simple expressions. The simple expressions however, of several logical IF statements, may be combined by using the boolean operators AND, OR and NOT, to form a single logical IF statement with a compound expression.

Parameters

Parameter

Description

and

The operator AND functions the same in a logical IF statement as the conjunction AND does in a sentence. For example, if an operation depended on the results of the two simple expressions A==B and C==D, the two logical IF statements, IF/A==B and IF/C==D, with the necessary labels and branching statements could be programmed to accomplish this task. However, these two simple expressions could be combined to form the compound logical IF statement, IF/A==B AND C==D and thereby reduce the amount of necessary programming.

or

Like the operator AND, the operator OR also functions the same in a logical IF statement as the conjunction OR does in a sentence. For example, if an operation depended on the results of the two simple expressions A==B or C==D, the two logical IF statements, IF/A==B or IF/C==D, with the necessary labels and branching statements could be programmed to accomplish this task. However, these two simple expressions could be combined to form the compound logical IF statement, IF/A==B OR C==D and thereby reduce the amount of necessary programming.

not

The operator NOT takes the result of the previously evaluated logical expression and complements or reverses it. For example:

IF/NOT(A==B),JUMP/L100:

The benefit of this feature is, that both conditions of an expression may be tested without changing the logical operators.


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.