HP C Programmer's Guide (92434-90009)

Chapter 3 43
Calling Other Languages
3 Calling Other Languages
This chapter describes how to call routines written in other HP languages from HP C
programs.
Invoking routines or accessing data defined or declared in another programming language
from HP C can be tricky. Here are some common problems:
Mismatched data types for parameters and return values.
Different language storage layouts for aggregates (arrays, records, variants, structures,
unions, equivalences, and commons).
Different formats for strings among HP C, HP Pascal, and HP FORTRAN 77.
Different language values for true, false, eof, and nil.
Different language bit level justification of objects smaller than 32 bits
(right-justification or most significant bit or byte last versus left-justification or most
significant bit or byte first).
The topics listed above are described in detail in this chapter. For additional information,
refer to Chapter 2, "Storage and Alignment Comparisons," in this manual. Also, the
following manuals have chapters on calling other languages:
HP Pascal/HP-UX Programmer's Guide
HP FORTRAN/9000 Programmer's Guide
COBOL/HP-UX Operating Manual