ProcedureBlock
Usage
The class definition specifies whether methods in the class are procedure blocks by default. To override that default, and specify that a given method is a procedure block, use the following syntax:
Method name(formal_spec) As returnclass [ ProcedureBlock ] { //implementation }
Or (equivalently):
Method name(formal_spec) As returnclass [ ProcedureBlock=1 ] { //implementation }
Otherwise, to specify that a given method is not a procedure block, use the following syntax:
Method name(formal_spec) As returnclass [ ProcedureBlock=0 ] { //implementation }
Details
This keyword specifies that an ObjectScript method is a procedure block.
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.
Default
If you omit this keyword, the value of the class-level ProcedureBlock keyword is used.
See Also
-
“Method Definitions” in this book
-
“Defining and Calling Methods” in Using Caché Objects
-
“Defining Method and Trigger Generators” in Using Caché Objects
-
“Introduction to Compiler Keywords” in Using Caché Objects