The fortran–pascal interface, Compiler mixed-language programs – HP SunSoft Pascal 4.0 User Manual

Page 187

Advertising
background image

163

The FORTRAN–Pascal Interface

8

This chapter describes how to mix FORTRAN 77 and Pascal modules in the
same program. It contains the following sections:

Compiler Mixed-Language Programs

When you compile with the

-v

(verbose) option, the Pascal driver brings in the

runtime libraries for the main module.

However, when you compile a module that is not the main module, and which
is written in a language different from the main module, you must explicitly
bring in the runtime library on the command-line.

For example, you must use the compiler options

–lpfc

and

–lpc

when you

compile a FORTRAN main routine that calls Pascal. The

–lpfc

option links

the common startup code for programs containing mixed Pascal and
FORTRAN object libraries. The

–lpc

option includes the Pascal object library,

libpc

.

Compiler Mixed-Language Programs

page 163

Compatibility of Types for FORTRAN and Pascal

page 164

General Parameter-Passing in FORTRAN and Pascal

page 167

Procedure Calls: FORTRAN-Pascal

page 168

Procedure Calls: Pascal-FORTRAN

page 185

Routines as Parameters

page 202

Advertising