InterSystems IRIS Data Platform 2019.2  /  Using Studio

Using Studio
Adding Class Parameters to a Class
Previous section           Next section
InterSystems: The power behind what matters   

A class parameter defines a constant value for all objects of a given class. When you create a class definition (or at any point before compilation), you can set the values for its class parameters. By default, the value of each parameter is the null string; to set a parameter's value, you must explicitly provide a value for it. At compile-time, the value of the parameter is established for all instances of a class. This value cannot be altered at runtime.
You can add a class parameter to a class definition in two ways:
To add a parameter using the Class Editor, position the cursor on a blank line in the Class Editor and enter a class parameter such as:
Parameter P1 = "x";
For details on parameter definitions, see “Defining and Referring to Class Parameters” in Defining and Using Classes. Also see “Parameter Definitions” in the Class Definition Reference.
New Class Parameter Wizard
You can use the New Class Parameter Wizard to create a new class parameter. You can open the New Class Parameter wizard by selecting Class > Add > Class Parameter . Alternatively, right-click the Class Inspector and select Add > New Class Parameter. You can also click the New Class Parameter button images/gstd_newparametericon.png on the toolbar.
The New Class Parameter wizard prompts you for information. Select Finish at any time (default values are provided for any information you have not specified).
The New Class Parameter wizard prompts you for the following information (you can later modify any of these values):
(required) Name of the class parameter. This name must be a valid parameter name and must not conflict with the name of a previously defined parameter.
See the section “Class Members” in the appendix “Rules and Guidelines for Identifiers” in the Orientation Guide for Server-Side Programming.
(optional) Description of the new class parameter. This description is used when the class' documentation is displayed in the online class library documentation.
A description may include HTML formatting tags. See “Creating Class Documentation” in Defining and Using Classes.
Default value for the class parameter. This will be the default value for this parameter for all instances of this class.

Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-10-18 05:16:51