(06-03-2023, 07:43 PM)SMcNeill Wrote: What does an IFF do?
From this Wikipedia article:
Code: (Select All)
IIf(expr, truepart, falsepart)
Although the code-volume-savings is nothing to brag about at all, it is very nice cognitively (semantically?) for assigning values to variables (and maybe some other circumstances I'm not thinking of).
So putting the focus on a variable:
Code: (Select All)
variable = IIF( expr, truevalue, falsevalue )
instead of putting the focus on an IF THEN ELSE statement:
Code: (Select All)
IF expr THEN variable = truevalue ELSE variable = falsevalue