Parameters

Constants that you set during project setup using the server-command name or the project configuration file.

Syntax

parameter typeName parameterName1 [:= constant_expression]
[,parameterName2 [:= constant_expression],…];

Components

typeName The datatype of the declared parameter.
parameterName The name of the declared parameter.
constant_expression An expression that evaluates to a constant.

Usage

Parameters are defined using the qualifier parameter. Optionally, you can specify a default value. The default value is used only if no value is provided for the parameter at server start-up.

Parameters can use only basic datatypes, and must be declared in the global DECLARE block of a project or a module. Parameters cannot be declared with complex datatypes. Since parameters are constant, their value cannot be changed in the model.

Parameters at Project Setup

You can define parameters inside the global declare block for a project and inside the global declare block for a module. Project-level parameters can be bound on server start-up. Module-level parameters are bound when the module is loaded.

Parameters can be assigned values at server start-up time by specifying the values on the command line used to start the server or through the project configuration file. You must provide values for any project parameters that do not have a default value. Parameters can only be bound to a new value when a module or project is loaded.

In the parameter declaration, you can specify a default value. The default value is used for the parameter if it is not bound to a new value when the project or module is loaded. If a parameter does not have a default value, it must be bound when the module or project is loaded, or an error occurs.

When a parameter is initialized with an expression, that expression is evaluated only at compile time. The parameter is then assigned the result as its default value.

When supplying values at runtime for a parameter declared as an interval datatype, interval values are specified with the unit notation in CCL and with a bare microsecond value in the project configuration file. See the Studio Users Guide for more information on project configurations and parameters in the project configuration file.