Overview | Statement List | Example


算术IF

Synopsis

IF/numerical expression,[label1:],[label2:],[label3:]

Description

This statement provides multiple choice branching based on the results of a numerical expression.

Parameter

numerical expression

A numerical expression which may be a constant, a variable or a combination of constants and variables.

[label1:],[label2:],[label3:]

The statement labels to where the program branches based on the results of the numerical expression.

If the outcome of the expression is less than zero, the program branches to the statement with the label "label1:".

If the outcome of the expression is equal to zero, the program branches to the statement with the label "label2:".

If the outcome of the expression is greater than zero, the program branches to the statement with the label "label3:".

NOTE: All of the labels in the IF statement above are optional, therefore, if a label is not given for the outcome of the expression, the next executable statement in the program is executed.


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