Difference between revisions of "IF()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to execute an immediate if | Function to execute an immediate if | ||
− | |||
==Syntax== | ==Syntax== | ||
IF(<expL>, <exp1>, <exp2>) | IF(<expL>, <exp1>, <exp2>) | ||
− | |||
==See Also== | ==See Also== | ||
− | + | [[ICASE()]], [[IF]] | |
− | + | ||
==Description== | ==Description== | ||
Line 15: | Line 12: | ||
The IF() function is synonymous with the IIF() function. | The IF() function is synonymous with the IIF() function. | ||
− | |||
==Example== | ==Example== | ||
Line 25: | Line 21: | ||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Latest revision as of 10:20, 26 October 2011
Contents
Purpose
Function to execute an immediate if
Syntax
IF(<expL>, <exp1>, <exp2>)
See Also
Description
The IF() function returns the value of the expression <exp1> or the value of the expression <exp2>, depending on the result of the expression <expL>. If the expression <expL> returns .T., the IF() function returns the value of <exp1>. If the expression <expL> returns .F., the IF() function returns the value of <exp2>. The expressions <exp1> and <exp2> may themselves contain IF() functions. The IF() function may be used anywhere that a normal expression can be used (e.g. in SQL SELECT column expressions).
The IF() function is synonymous with the IIF() function.
Example
event = "drama" ? if(event = "drama", "It's for Drama", "It's not for Drama") It's for Drama