![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395114x1.png)
6
The
When you compile a Pascal main routine that calls C, you don’t have to use any special options, but the
For example:
hostname% cc
hostname% pc
Compatibility of Types for C and Pascal
Table
Table
Pascal Type | C Type | Size (bytes) | Alignment (bytes) | |
|
|
|
| |
double | double | 8 | 8 | |
|
|
|
| |
longreal | double | 8 | 8 | |
|
|
|
| |
real | double | 8 | 8 | |
|
|
|
|
|
single | float |
| 4 | 4 |
|
|
|
|
|
shortreal | float |
| 4 | 4 |
|
|
|
|
|
integer16 | short | int | 2 | 2 |
|
|
|
|
|
integer32 | int |
| 4 | 4 |
|
|
|
|
|
integer | int |
| 4 | 4 |
|
|
|
|
|
char |
| 1 | 1 | |
|
|
|
|
|
boolean | char |
| 1 | 1 |
|
|
|
|
|
alfa | char | a[10] | 10 | 1 |
|
|
|
|
|
char | char |
| 1 | 1 |
|
|
|
|
|
string | char | a[80] | 80 | 1 |
|
|
|
| |
varying[n] of char | struct {int, char[n]} | - | 4 | |
|
|
|
| |
record | struct/union | - | Same as element type | |
|
|
|
|
|
90 | Pascal 4.0 User’s Guide |