| Applying science to business management |
  
firsttrue
Format: firsttrue( a, b, ... )
Arguments: (bool) a, b, ... Any valid
Boolean expressions
Returns: (text) Text of the argument that returned the
first true value
Description: Firsttrue evaluates the expressions a,
b, ... in that order and stops evaluating arguments as soon
as one returns a true Boolean value. Firsttrue
returns the expression that resulted in the true value.
This primitive is useful in constructing the root node in
rule-based applications. Generally, a rule-based application's
root node is of the form
Root:=firsttrue(Option1,Option2,...)
Option1, Option2, ... are names of branches that
individually test the validity of competing options using rule
sets.
Examples: First:=false
Second:=true
Third:=true
firsttrue(First,Second,Third) =
Second
See Also: best, max, Logical
And, Logical Or
|