When an operand evaluates to NONE

The following table explains how an operator expression evaluates when an operand evaluates to none.

The symbol A represents one operand of the expression and B represents the other operand. The symbol != means "not equal to".

Operator Expression Condition Evaluates to:
A / B A = NONE B = NONE NONE
A*B A = NONE B = NONE NONE
A / B A != NONE B = NONE 0
A*B A != NONE B = NONE 0
A + B A = NONE B = NONE NONE
A - B A = NONE B = NONE NONE
A + B A = NONE B != NONE B
A - B A = NONE B != NONE -B
A + B A != NONE B = NONE A
A - B A != NONE B = NONE A
A > B A = NONE B = NONE FALSE
A < B A = NONE B = NONE FALSE
A = B A = NONE B = NONE TRUE
A > B A = NONE B != NONE FALSE
A < B A = NONE B != NONE TRUE
A = B A = NONE B != NONE FALSE
A > B A != NONE B = NONE TRUE
A < B A != NONE B = NONE FALSE
A = B A != NONE B = NONE FALSE

For example, in this operator expression:

Total = #Guests + 1

if #Guests evaluates to "none", the value for Total will be 1.


Feedback