Chapter 21
Procedures
Shows how to define, customize, and use G2 procedures.
- Introduction
- Procedure Syntax
- Local Names in Procedures
- Procedure Header Syntax
- Duplicate Procedure Names
- Local Declarations Syntax
- Terminology
- Procedure Body Syntax
- Statements
- Error Handler Syntax
- Comments
- Defining a Procedure
- Procedure Attributes
- Sample Procedure
- Using Procedures
- Invoking a Procedure
- Passing Arguments to a Procedure
- Accessing Variables in a Procedure
- Memory Management in Procedures
- Allowing Other Processing
- Wait States
- Processing During Wait States
- Using Wait States Cautiously
- Limiting Procedure Execution Time
- Setting Procedure Priority
- Debugging a Procedure
- Displaying a Procedure's Invocation Hierarchy
- Inlining a Procedure
- Declaring a Procedure as Inlineable
- Recompiling an Inlineable Procedure
- Testing for an Inlined Procedure
- Creating Procedure Invocations
- Aborting a Runaway Procedure
- Expressions for Procedures
- The Procedure Containing the Expression
- The Procedure Invocation Associated With the Procedure Containing the Expression
- Procedures and Rules
- Dictionary of Procedure Statements
- allow other processing
- Assignment (=)
- begin-end
- call
- Calling and Wait States
- Asynchronous Invocation
- case
- collect data
- Executing a Collect Data Statement
- do in parallel
- Do in Parallel and Wait States
- Using do in parallel Effectively
- Concurrency and Asynchrony
- exit if
- for
- Iterating Over Each Instance of a Class of Items
- Iterating Using a Counter
- For Each and Wait States
- go to
- if-then
- on error
- On Error Statement Syntax
- Superseded On Error Statement Syntax
- repeat
- return
- signal
- Signal Statement Syntax
- Superseded Signal Statement Syntax
- wait
Copyright © 1997 Gensym Corporation, Inc.