Logic functions
 
Function
Description
Custom or in VFP subset?
IIF(LOG_VALUE, TRUE_RESULT, FALSE_RESULT)
If LOG_VALUE is .TRUE. then IIF() returns the TRUE_RESULT value. Otherwise, IIF() returns the FALSE_RESULT value. Both TRUE_RESULT and FALSE_RESULT must be the same length and type. Otherwise, an error results.
VFP subset
 
Examples:
IIF( VALUE < 0, "Less than zero ", "Greater than zero" )
IIF( NAME = "John", "The name is John", "Not John " )