Matching Procedure Types

ALGOL Procedure Types

Procedures in ALGOL and some other languages can be invoked as functions that return values. Such procedures are referred to as typed procedures. For example, an ALGOL procedure can be of any of the following types:

  • Untyped

  • ASCII STRING

  • BOOLEAN

  • COMPLEX

  • DOUBLE

  • EBCDIC STRING

  • HEX STRING

  • INTEGER

  • REAL

COBOL Procedure Types

A client program written in COBOL74 or COBOL85 can use the GIVING clause of the CALL statement to receive the value returned by a typed library procedure.

FORTRAN77 Procedure Types

A FORTRAN77 library procedure can be any of the following:

  • SUBROUTINE

  • REAL FUNCTION

  • INTEGER FUNCTION

  • DOUBLE PRECISION FUNCTION

  • LOGICAL FUNCTION

  • COMPLEX FUNCTION

  • CHARACTER FUNCTION (FORTRAN77 only)

  • COMMON

  • FILE

Matching the Procedure Types

If an export procedure is typed, the matching import procedure must be of the same type or a compatible type. For information about the compatibility of data types in different languages, refer to Matching Parameter Types.