|Contents:||Main||Chapter||See Also:||Getting Started Manual||Programmer Manual|
expression is an expression that can be evaluated as True or False (not zero or zero).
value is any expression that can yield a value.
|Use:||Each value is associated with the test from which it is separated by a colon. The function returns the evaluation of the value associated with the first test that evaluates as true (i.e., not equal to zero). Any number of test:value pairs can be used; however, one of the tests must evaluate as true. To assure that one test will always evaluate as true, the last test is usually the literal 1.|
$S("Bill Nichols, Ph.D."["M.D.":"He is a medical doctor.",1:"He is not a medical doctor.")=> He is not a medical doctor.
$S(OCCURRENCES>3:"Chronic Condition",OCCUR-RENCES>0: "Non Chronic Condition",1:"No Occurrences Recorded")=> Chronic Condition [Here the contents of the OCCURRENCES field is being tested. If the first test (>3) is true (as in this example), the result of the second test (>0) is not relevant.]
Reviewed/Updated: March 4, 2007