Skip to main content

Defining Class Parameters

Defining Class Parameters

To add a class parameter to a class definition, add an element like one of the following to the class:

Parameter PARAMNAME;

Parameter PARAMNAME as Type;

Parameter PARAMNAME as Type = value;

Parameter PARAMNAME as Type [ Keywords ] = value;

Where

  • PARAMNAME is the name of the parameter. Note that by convention, parameters in InterSystems IRIS® data platform system classes are nearly all in uppercase; this convention provides an easy way to distinguish parameters from other class members, merely by name. There is no requirement for you to do the same.

  • Type is a parameter type. See the next section.

  • value is the value of the parameter. In most cases, this is a literal value such as 100 or "MyValue". For some types, this can be an ObjectScript expression. See the next section.

  • Keywords represents any parameter keywords. These are optional. For an introduction to keywords, see Compiler Keywords. For parameter keywords; see Parameter Keywords.

FeedbackOpens in a new tab