HPlogo HP C/HP-UX Programmer's Guide: HP 9000 Computers

Chapter 3 Calling Other Languages

» 

Technical documentation

Complete book in PDF

 » Table of Contents

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 90.

  • 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, the following manuals have chapters on calling other languages:

  • HP Pascal/HP-UX Programmer's Guide

  • HP Fortran 90 Programmer's Guide

  • COBOL/HP-UX Operating Manual

© Hewlett-Packard Development Company, L.P.