Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section

ProcedureBlock

Specifies whether each ObjectScript method in this class is a procedure block by default.

Usage

To cause the ObjectScript methods in this class to be procedure blocks by default, either omit this keyword or use the following syntax:

Class MyApp.MyClass [ ProcedureBlock ]  { //class members }

Otherwise, use the following syntax:

Class MyApp.MyClass [ Not ProcedureBlock ] { //class members }

Details

This keyword specifies whether ObjectScript methods in this class are procedure blocks by default. You can override this for an individual methods by setting the ProcedureBlock keyword for the method.

This keyword is ignored for methods written in other languages.

Within ObjectScript, methods can be implemented as procedure blocks or not. Procedure blocks enforce variable scoping: methods cannot see variables defined by their caller. New applications use procedure blocks; non-procedure blocks exist for backwards compatibility.

Effect on Subclasses

This keyword is not inherited.

Default

If you omit this keyword, each ObjectScript method in this class is a procedure block (unless you override that for individual methods).

See Also