89
The C–Pascal Interface
6
This chapter describes how to mix C and Pascal modules in the same program.
It contains the following sections:
The examples in this chapter assume that you are using the ANSI C compiler.
To invoke ANSI C:
•
On the Solaris 1.x environment, use the
acc
command
•
On the Solaris 2.x environment, use the
cc
command
Compilation of Mixed-Language Programs
You must use the compiler option
–lpc
when you compile a C main routine
that calls Pascal.
–lpc
includes the Pascal object library
libpc
. For example:
hostname% pc -c -calign my_pascal.p
hostname% cc my_pascal.o my_c.c -lpc
Compilation of Mixed-Language Programs
page 89
Compatibility of Types for C and Pascal
page 90
General Parameter Passing in C and Pascal
page 93
Procedure Calls: C–Pascal
page 93
Procedure Calls: Pascal–C
page 117
Procedures and Functions as Parameters
page 132
Global Variables in C and Pascal
page 133
File-Passing Between Pascal and C
page 134
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......