Replies: 1 comment
-
|
Library is almost ready, soon will included in the upcoming Package. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
FBASIC Decision Table Commands
This document defines the syntax and usage for manipulating decision tables in FBASIC using the custom command set.
Commands
DTDIM
DTDIM name, otherwise_value, [factor1], [factor2], ..., [factorN]Declares a decision table with one or more decision factors and a single result column.
DTROW
DTROW name, resultValue, valueOfFactor1, valueOfFactor1, ..., valueOfFactorNAdds a new row (rule) to an existing decision table, specifying factor values and the corresponding result.
number of factors should be the same as the DTDIM statement, otherwise an error will occured
Search the decision table
There are two methods to extract result value from a decision table
see below)see below)DTFIND
DTFIND name, valueOfFactor1, ..., valueOfFactorN, resultVarQueries the decision table with specified factor values. If a matching row is found, the result is stored in
resultVar.After each
DTFINDcommand, the constantFOUNDis automatically set:FOUND = -1if a matching row was found (true).FOUND = 0if no matching row was found (false).DTFACTOR name, valueOfFactor
DTFACTOR name, factorName, valueOfFactorSet search value (
valueOfFactor) for decision tablenameandfactorNameUtility Function
dtcount
Returns the number of rules (rows) currently defined in the decision table.
Example Usage
Notes
FOUNDis a read-only constant representing the success of the lastDTFIND.-1represents true and0represents false.Beta Was this translation helpful? Give feedback.
All reactions