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 Defining and Using Classes
“Defining Method and Trigger Generators” in Defining and Using Classes
“Introduction to Compiler Keywords” in Defining and Using Classes