PENDING PROCEDURE ACTUAL Declaration

<pending procedure actual declaration>

──┬──────────────────┬─ PROCEDURE ──<structure block type identifier>──►
  └─<procedure type>─┘
►─ . ──<procedure heading>── ; ──<unlabeled statement>─────────────────┤

The PENDING PROCEDURE ACTUAL declaration provides the body of the procedure that was previously declared as PENDING in the STRUCTURE or CONNECTION BLOCK TYPE declaration. This declaration must appear at the same level as and outside the STRUCTURE or CONNECTION BLOCK TYPE declaration in which the pending procedure is contained.

All variables declared inside the STRUCTURE or CONNECTION BLOCK TYPE declaration become the outer scope for the procedure. Variables declared outside the STRUCTURE or CONNECTION BLOCK TYPE declaration become the next most outer scope.

The following is an example of a PENDING PROCEDURE ACTUAL declaration:

REAL X;
TYPE STRUCTURE BLOCK SB;
  BEGIN
  PROCEDURE P; PENDING;
  REAL X;
  REAL R;
  REAL Z;
  END;
REAL R;
REAL Z;
PROCEDURE SB.P;
  BEGIN
  REAL Z;
  X := 100;    %Updates X contained in SB
  R := 100;    %Updates R contained in SB
  Z := 100;    %Updates Z contained in procedure P
  END;