![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395148x1.png)
6
The commands to compile and execute IntCA.c and IntCAMain.p
hostname% cc
hostname% pc
hostname% a.out
444
The
Records and Structures
In most cases, a Pascal record describes the same objects as its C structure equivalent, provided that the components have compatible types and are declared in the same order. For more information, see “Compatibility of Types for C and Pascal” on page 90.
Records that contain aggregates may differ because aggregates in C and Pascal sometimes have different sizes and alignments. If you compile the Pascal code with the
A Pascal record of an integer and a character string matches a C structure of an integer and an array of char values, as follows:
The C function, StruChr.c | #include <string.h> |
struct TVarLenStr {
int nbytes; char a[26];
};
void StruChr(struct TVarLenStr *v)
{
}
124 | Pascal 4.0 User’s Guide |