Difference between revisions of "SET OPTLOG"
From Recital Documentation Wiki
Barrymavin (Talk | contribs) (→Example) |
Helengeorge (Talk | contribs) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
To specify whether logical expression optimization should take place | To specify whether logical expression optimization should take place | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[DB_OPTLOG]] | + | [[DB_OPTLOG]], [[Logical Operators]] |
==Description== | ==Description== | ||
− | The SET OPTLOG command is used to specify whether logical expression optimization should take place or not. | + | The SET OPTLOG command is used to specify whether logical expression optimization should take place or not. If SET OPTLOG is OFF, evaluating a logical expression causes the entire expression to be evaluated. If SET OPTLOG is ON, the evaluation of the logical expression is optimized. The optimization causes the evaluation to stop as soon as the result of the evaluation is known. |
==Example== | ==Example== | ||
− | <code lang="recital | + | <code lang="recital"> |
// No error, even if crash() function does not exist | // No error, even if crash() function does not exist | ||
set optlog on | set optlog on | ||
Line 37: | Line 30: | ||
// Gives error if crash() function does not exist | // Gives error if crash() function does not exist | ||
set optlog off | set optlog off | ||
− | ? .T. or crash()</code> | + | ? .T. or crash() |
+ | </code> | ||
+ | |||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category:Set_Commands|OPTLOG]] | + | [[Category:Set_Commands|OPTLOG]] |
+ | [[Category:Performance and Optimization]] | ||
+ | [[Category:Performance and Optimization Set Commands]] | ||
+ | [[Category:Environment]] | ||
+ | [[Category:Environment Set Commands]] |
Latest revision as of 16:26, 23 November 2009
Purpose
To specify whether logical expression optimization should take place
Syntax
SET OPTLOG ON | OFF
See Also
Description
The SET OPTLOG command is used to specify whether logical expression optimization should take place or not. If SET OPTLOG is OFF, evaluating a logical expression causes the entire expression to be evaluated. If SET OPTLOG is ON, the evaluation of the logical expression is optimized. The optimization causes the evaluation to stop as soon as the result of the evaluation is known.
Example
// No error, even if crash() function does not exist set optlog on ? .F. and crash() // Gives error if crash() function does not exist set optlog off ? .F. and crash() // No error, even if crash() function does not exist set optlog on ? .T. or crash() // Gives error if crash() function does not exist set optlog off ? .T. or crash()
Products
Recital Server, Recital