Project

General

Profile

$iif » History » Version 2

Per Amundsen, 02/23/2023 01:57 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$iif(C,T,F)*
4
5
Returns T or F depending on whether the evaluation of the Conditional C is true or false.
6
7 2 Per Amundsen
*Parameters*
8
9
table(ktable).
10
|*Parameter*|*Description*|
11
| C | The expression to check. |
12
| T | The text to use if the result is [[$true]]. |
13
| F | The text to use if the result is [[$false]]. |
14
15 1 Per Amundsen
_See also [[/if]]._
16
17
*Example*
18
19
<pre>
20
; Print 'yes' or 'no' depending if 1 equals 2.
21
//echo -ag $iif(1 == 2, yes, no)
22
</pre>