contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Test expressions: conditional evaluations
Prerequisite Concepts      

OmniMark omits the evaluation of the second operation of an & or | expression when the result of the first operand is sufficient to determine the result of the whole expression. This is very useful when the first part of the test is used to ensure that the second part of the test will not cause an error.

Conditional evaluation also lets you take advantage of your knowledge of the behavior of your own program in order to gain some efficiency. For instance, when combining two test expressions with an & or an |, if you know that one of the operands takes significantly longer than the other, place the shorter one first so that the second, more "expensive" operand will be examined as rarely as possible.

Another technique can be used when combining two test expressions with an & and one of the expressions usually evaluates to false. Place that operand first, so that the second expression need rarely be executed. The same technique can be used when using | and one of the operands usually evaluates to true.

Prerequisite Concepts
     Conditional constructs
   Test expressions
 
   
----

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:00:52 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.