This is a Visual FoxPro function which evaluates the results from a list of conditions.
Syntax
ICase( lCondition1, eResult1, lCondition2, eResult2, eOtherwiseResult])
Arguments
lCondition
Specifies a condition as a logical expression to evaluate.
If lCondition evaluates to False (.F.), ICASE( ) continues to evaluate the next condition and returns the corresponding eResult for that condition if it evaluates to True (.T.). If lCondition evaluates to null (.NULL.), Visual FoxPro treats lCondition as if it evaluated to False (.F.).
eResult
Specifies a result to return if lCondition evaluates to True (.T.).
eOtherwiseResult
Contains the result returned if all conditions evaluate to False (.F.).
Return Value
ICASE( ) returns the first eResult as soon as lCondition evaluates to True (.T.).
If all conditions evaluate to False (.F.), ICASE( ) returns eOtherwiseResult.
If eOtherwiseResult is omitted, and all conditions evaluate to False (.F.), ICASE( ) returns null (.NULL.).
See Also
Page url: http://www.racematenet.com/english/help/index.html?icase.htm