Module Contents
Each CSL module contains the following kinds of top-level syntactic elements:
Import directives effectively include the text of a specified file in the current CSL file. See Imports for more information.
Formulas are essentially named expressions. When a formula is evaluated, the expression is evaluated, and the result is established as the value of the name. The expression can evaluate to a number, string, boolean, collection, or object. See Formulas for more information.
Rules are essentially named or unnamed boolean expressions. When a rule is evaluated, the expression is evaluated, and the rule returns the result. For a named rule, if the result is false, the message with a matching name is evaluated. See Rules for more information.
Messages are essentially named strings. When a rule with a matching name fails, the string is appended to the cost engine log. See Messages for more information.
Function definitions are essentially parameterized formulas. Function invocation expressions specify actual parameters for the definition’s formal parameters. See Function Definitions for more information.
Set blocks are sequences of formulas enclosed in braces. A formula that is not within a set block is evaluated only if either it is an output formula or its evaluation is required (directly or indirectly) for the evaluation of an output formula (see Outputs). A formula that is within a set block is always evaluated as part of the evaluation of the module that contains it.. Set blocks are typically used to pass information to other modules by setting fields of input objects. See Set Blocks for more information.
See Modules, Inputs, and Outputs for information on the syntactic structure of CSL modules.