| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (5 out of 30)

abort

This action aborts a procedure or a procedure invocation. A procedure is an item. A procedure invocation is a transient item that exists when G2 executes any procedure whose Class-of-procedure-invocation attribute has the value procedure-invocation, or any subclass of that class.

To abort a procedure or procedure invocation:

The two examples that follow illustrate first how to abort a specific procedure invocation and then how to abort a procedure by name. In the first example, filling is a user-defined relation.


For a description of procedures and procedure invocations, see Chapter 21, Procedures.

Aborting a Procedure or Method

To use the abort procedure action:

where procedure is one of:

You can use the statement abort this procedure only within a procedure or method. When you abort a procedure, G2 aborts all invocations of that procedure.

Aborting a Procedure or Method Invocation

To abort a procedure or method invocation:

where procedure-invocation is a statement referring to a procedure-invocation in one of several ways, including every. When you abort a procedure-invocation, G2 aborts only the particular invocation. For example, you can refer to a procedure-invocation from within a procedure or method as this procedure-invocation, or you can specifically identify the procedure-invocation.

If you reference the method by using the class::method syntax, invoking the abort action that way aborts all invocations of the method.

To refer to a procedure-invocation, the Class-of-procedure-invocation attribute of the procedure or method must have the value procedure-invocation.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (5 out of 30)

Copyright © 1997 Gensym Corporation, Inc.