Chapter Contents

Previous

Next
Simple Interlanguage Communication

An Overview of Interlanguage Communication

Communication between C and another high-level language such as FORTRAN or PL/I follows the same principles as communication between C and assembler language. (See Communication with Assembler Programs for more information on communicating with assembler language programs.) However, a high-level language introduces several potential complications into the communication.

First, many high-level languages require their own execution framework, or environment. (Execution frameworks are also discussed in more detail in Using the indep Option for Interlanguage Communication.) The other language's framework must be active when a routine in that language receives control. This is in contrast to assembler language programs, which can execute with the C execution framework still active. When control passes to C, the C framework must be active. Therefore, the appropriate framework must be activated whenever control passes across a language boundary.

Second, a high-level language may not be able to create parameter blocks in the format expected by a C program, and C may not be able to create parameter blocks in the format expected by another language.

Third, the other high-level language may not support every C data type or may support additional data types with no corresponding C data types.

Last, error handling can be complex. It is sometimes important to ensure that the language in which an error occurs is the one that handles the error.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.