Compiler Mixed-Language Programs
The FORTRAN–Pascal Interface
This chapter describes how to mix FORTRAN 77 and Pascal modules in the
same program. It contains the following sections:
Compiler Mixed-Language Programs
Compatibility of Types for FORTRAN and Pascal
General Parameter-Passing in FORTRAN and Pascal
Procedure Calls: FORTRAN-Pascal
Procedure Calls: Pascal-FORTRAN
Routines as Parameters
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.
8
page 163
page 164
page 167
page 168
page 185
page 202
163
Need help?
Do you have a question about the SunSoft Pascal 4.0 and is the answer not in the manual?
Questions and answers