The information in this article applies to:
SUMMARYThe IIF (Immediate If) function returns one of two expressions, depending on the value of a logical expression. When IIF evaluates a logical expression, if the logical expression evaluates to a logical true value (.T.), IIF returns the value of the first expression. If the logical expression evaluates to a logical false value (.F.), IIF returns the value of the second expression. MORE INFORMATIONThe IIF function can be used in place of the IF ... ENDIF structure for simple conditional expressions. This function is especially useful in CREATE REPORT or CREATE LABEL commands to conditionally specify field contents. In a FoxBASE+ or FoxPro report or label, the IIF
also executes considerably faster than the equivalent IF ... ENDIF
statements.
Examples
* This code returns 10.
* This code returns 9.
Additional query words: VFoxWin FoxWin FoxDos 1.00 2.50 2.50a 2.50b 2.60 2.60a 1.x 2.x
Keywords : |
Last Reviewed: December 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |