Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

Conditional Evaluation

Unlike most other operators, Logical And and Logical Or do not necessarily evaluate both operands. For example, the expression false&&x will evaluate to false regardless of the value of x. Similarly, true||x is always true. In both of these cases, the value of the second operand is unimportant, so DScript will not evaluate it. It is important to be aware of this behavior, especially if evaluating the second operand could cause some side effect.

Note that only the second operand is conditionally evaluated. The expression x&&false is always false, regardless of the value of x. However, in this case, x will still be evaluated. DScript includes a capability called Logical Look-Ahead that extends the conditional evaluation of operands so that x will not be evaluated in this example as well.

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend