Linking a Connection Library to a Server Library

Example

The following ALGOL statements declare a connection library and then execute a LINKLIBRARY function to link to a server library:

TYPE CONNECTION BLOCK TEST1;
   BEGIN
   PROCEDURE PROC2;
      IMPORTED;
   END;

TEST1 LIBRARY CL1 (LIBACCESS = BYTITLE, TITLE = “OBJECT/SERVLIB.”,
                   CONNECTIONS = 3);

RSLT:= LINKLIBRARY (CL1[0]);

The library program OBJECT/SERVLIB referenced in the preceding example can be a server library program. In this case, it is not necessary to specify an INTERFACENAME because a server library program can contain no more than one server library.

Server Library Linked to by Connection Library

Such a server library might contain ALGOL statements such as the following:

PROCEDURE PROC2;
  BEGIN
  % Procedure body statements
  END;

EXPORT PROC2;

FREEZE (TEMPORARY);

Thus, connection 0 of connection library CL1 in the first example imports procedure PROC2 from the server library in the second example.