docs/GDLC_manual.md in gdlc-2.6.0.1 vs docs/GDLC_manual.md in gdlc-3.0.0.0

- old
+ new

@@ -204,12 +204,20 @@ + `numeric` + `percentage` + `text` + `datetime` -TODO: NUMERIC PRECISION +To specify the _visible_ precision of a numeric value, surround the desired +precision with parens immediately after the `numeric` keyword. +Note that this doesn't affect the actual precision of the variable's value +when used in calculations (16 places), only how it is displayed to the user. + +##### Example + + dpm numeric(2) loanAmount "Loan Amount"; + #### References ### DSMs DSM variables are Decision Parameters, a special subset of DPM variables. They @@ -239,18 +247,28 @@ - - - ## Lookups ### Definitions +_Prior to 3.0:_ + lookup("Lookup Name", xParameterVariable, yParameterVariable); +_3.0 +_ + + lookup("Lookup Name"); + +The `Xparameter` and `Yparameter` details are now included as part of the Lookup +data. Previously, the parameters were defined in the `lookup` declaration +statement (above). + ### References This statement defines a lookup and returns the looked-up value. It can be used on the right hand side of an assignment ( `=` ) statement. - aValue = lookup("FHA-ClosingCostState", pSubjectPropertyState, globalParam); + aValue = lookup("FHA-ClosingCostState"); When a lookup is defined, the compiler searches for the lookup data in memory. An error will be thrown if the data does not exist. See the `import` statement for how to load lookup data. @@ -260,16 +278,23 @@ - - - ## PowerLookups ### Definitions -TODO: Need more info here. +PowerLookups are just `Ruleset`s defined within a `xls/csv` file. +As such, there are no special definition statements for PLKs. - Example needed. - ### References +Because PowerLookups are simply Rulesets, they are referenced the +same way any other ruleset is referenced: + + ruleset SomeRuleset(); + +Prior to referencing a PowerLookup ruleset, the ruleset must be +`import`ed. + - - - ## Rules ### Definitions @@ -418,11 +443,11 @@ - - - ## Rulesets ### Definitions -TODO: Missing info about 'PL' modifier keyword. +_TODO: Missing info about 'PL' modifier keyword._ ruleset InitAppraisedValue(continue) rule SetAppraisedValue() if(pLoanAmount == pLoanAmount) @@ -588,13 +613,13 @@ the variable name with `<DPM> </DPM>` tags. When using DPM variables within messages, if the DPM/DSM has an alias defined, the alias must be used; the engine only recognizes/knows about the alias. -TODO: IS THIS STILL TRUE (ABOUT ALIASES)? +_TODO: IS THIS STILL TRUE (ABOUT ALIASES)?_ -TODO: DISCUSS THE ABILITY TO UNDERSTAND ALIAS' WHEN PULLING FROM PLKS. +_TODO: DISCUSS THE ABILITY TO UNDERSTAND ALIAS' WHEN PULLING FROM PLKS._ Message definition statements must be terminated with a `;`. Message definitions can only be used within the 'if-true' or 'if-false' sections of rule definitions. @@ -768,9 +793,27 @@ ### Lookup Files import( lookup, "TestLookups.csv"); The `lookup` import type will import Lookup matricies from a CSV file. + +_Prior to 3.0_ + +The expected format of a lookup table is: + +![Old Lookup format](img/old_lookup_format.png "Pre 3.0 Lookup Format") + +_3.0 +_ + +The expected format is now: + + +![New Lookup format](img/new_lookup_format.png "3.0 Lookup Format") + + +The `Xparameter` and `Yparameter` details are now included as part of the Lookup +data. Previously, the parameters were defined in the `lookup` declaration +statement. - - - ### PowerLookup Files import( powerlookup, "TestPowerLookups.csv");