FORTRAN Reference Manual
FORTRAN Reference Manual—528615-001
13-1
13 Mixed-Language Programming
This section describes how you can combine procedures written in C, COBOL85, 
FORTRAN, Pascal, and TAL into an executable object file.
Topics covered in this section include:
You might find mixed-language programming useful because each language offers 
distinct advantages in writing certain kinds of routines or because you don’t want to 
rewrite code written in another language that you want to use in a FORTRAN program.
For information about data type correspondence in C, COBOL85, FORTRAN, Pascal, 
and TAL, see Appendix D, Data Type Correspondence and Return Value Sizes.
Prior to D-series software, object files written in one HP language could be bound with 
object files from other HP languages but they were extremely limited in the resources 
they could use. With few exceptions, all run-time libraries used the same memory 
areas but each run-time library specified its own unique layout for the data in that area.
The Common Run-Time Environment—CRE
D-series software introduces the facilities of the Common Run-Time Environment 
(CRE). The CRE provides services to programs written in C, COBOL85, FORTRAN, 
Pascal, and TAL.
Using the CRE
In general, you do not need to do anything special to take advantage of the services of 
the CRE. The FORTRAN run-time library accesses routines in the CRE when it is 
appropriate to do so—you need to change few, if any, constructs in your program to 
take advantage of the services of the CRE.
If you specify ENV COMMON when you compile your FORTRAN program, routines in 
the FORTRAN run-time library call CRE routines for some of the services that are 
handled by Guardian routines in C-series software. Programs that specify ENV OLD do 
not call CRE routines.
The FORTRAN run-time library uses CRE services to:
Topic Page
The Common Run-Time Environment—CRE
13-1
Sharing Files When ENV COMMON Is in Effect 13-2
Module Compatibility 13-3
Referencing Separately-Compiled Procedures 13-4
Calling Other Language Procedures From FORTRAN 13-12
Calling FORTRAN Procedures From Other Languages 13-23
Using ENV COMMON 13-26










