Difference between revisions of "DB OPTLOG"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Used to determine whether the evaluation of logical expressions should be optimized | Used to determine whether the evaluation of logical expressions should be optimized | ||
Line 15: | Line 8: | ||
==Description== | ==Description== | ||
− | The DB_OPTLOG environment variable | + | The DB_OPTLOG environment variable is used to determine whether the evaluation of logical expressions should be optimized. If DB_OPTLOG is set to "OFF" or "NO" or "FALSE", evaluating a logical expression causes the entire expression to be evaluated. If DB_OPTLOG is set to "ON" or "YES" or "TRUE", 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. |
For example: | For example: | ||
Line 21: | Line 14: | ||
If DB_OPTLOG is switched off, the following command will cause an error, assuming no function called ’crash’ exists. | If DB_OPTLOG is switched off, the following command will cause an error, assuming no function called ’crash’ exists. | ||
− | + | <code lang="recital"> | |
+ | ? .F. and crash()</code> | ||
If DB_OPTLOG is switched on, no error will occur, since the evaluation process will stop after the .F. has been evaluated. At this point, the result of the expression can only be .F. (false). | If DB_OPTLOG is switched on, no error will occur, since the evaluation process will stop after the .F. has been evaluated. At this point, the result of the expression can only be .F. (false). | ||
Line 27: | Line 21: | ||
If DB_OPTLOG is switched off, the following command will cause an error, assuming no function called ’crash’ exists. | If DB_OPTLOG is switched off, the following command will cause an error, assuming no function called ’crash’ exists. | ||
− | + | <code lang="recital"> | |
+ | ? .T. or crash()</code> | ||
If DB_OPTLOG is switched on, no error will occur, since the evaluation process will stop after the .T. has been evaluated. At this point, the result of the expression can only be .T. (true). | If DB_OPTLOG is switched on, no error will occur, since the evaluation process will stop after the .T. has been evaluated. At this point, the result of the expression can only be .T. (true). | ||
Line 33: | Line 28: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital, Recital Server |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Configuration]] | [[Category:Configuration]] | ||
[[Category:Environment Variables|OPTLOG]] | [[Category:Environment Variables|OPTLOG]] |
Latest revision as of 09:48, 4 March 2010
Contents
Purpose
Used to determine whether the evaluation of logical expressions should be optimized
See Also
Description
The DB_OPTLOG environment variable is used to determine whether the evaluation of logical expressions should be optimized. If DB_OPTLOG is set to "OFF" or "NO" or "FALSE", evaluating a logical expression causes the entire expression to be evaluated. If DB_OPTLOG is set to "ON" or "YES" or "TRUE", 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.
For example:
If DB_OPTLOG is switched off, the following command will cause an error, assuming no function called ’crash’ exists.
? .F. and crash()
If DB_OPTLOG is switched on, no error will occur, since the evaluation process will stop after the .F. has been evaluated. At this point, the result of the expression can only be .F. (false).
If DB_OPTLOG is switched off, the following command will cause an error, assuming no function called ’crash’ exists.
? .T. or crash()
If DB_OPTLOG is switched on, no error will occur, since the evaluation process will stop after the .T. has been evaluated. At this point, the result of the expression can only be .T. (true).
Products
Recital, Recital Server