Declare Blocks

Declare blocks allow a model designer to include elements of functional programming, such as variables, parameters, typedefs, and function definitions in CCL data models.

CCL supports global and local declare blocks.

CCL variables allow for the storage of values that may change during the execution of the model. Variables are defined in the declare block using the SPLASH syntax.

CCL typedefs are user-defined datatypes and can also be used to create an alias for a standard datatype. A long type name can be shortened using typedef. Once a typedef has been defined in the declare block, it can be used instead of the datatype in all SPLASH statements, and throughout the project.

CCL parameters are constants for which you can set the value at the model's runtime. You can use these parameters instead of literal values in a project to allow behavior changes at runtime, such as window retention policies, store sizes, and other similar changes that can be easily modified at runtime without changing the project. You define CCL parameters in a global declare block, and initialize them in a project configuration file. You can also set a default value for the parameter in its declaration, so that initialization at server start-up is optional.

You can create SPLASH functions in a declare block to allow for operations that are more easily handled using a procedural approach. Call these SPLASH functions from stream queries and other functions throughout the project.