HP C Programmer's Guide (92434-90009)

46 Chapter3
Calling Other Languages
Comparing HP C and HP Pascal
Notes on HP C and HP Pascal
1. The longint type in HP Pascal is a 64-bit signed integer. A corresponding HP C type
could be any structure or array of 2 words; however, HP C cannot directly operate on
such an object.
2. By default, HP C enumerations are allocated 4 bytes of storage, while HP Pascal
enumerations use the following scheme:
1 byte, if fewer than 257 elements.
void Used when
calling an
HP Pascal
procedure
(See Note 12)
pointer 4 bytes, 4-byte aligned pointer to
correspondin
g type
4 bytes, 4-byte aligned
long pointer 8 bytes, 8-byte aligned $ExtnAddr$
pointer or
$ExtnAddr$
VAR
parameter
8 bytes, 4-byte aligned
char 1 byte, 1-byte aligned boolean
(See Note 13)
1 byte, 1 byte aligned
void function
parameter
4 bytes, 4-byte aligned PROCEDURE
parameter
4 bytes, 4-byte aligned
function
parameter
4 bytes, 4-byte aligned FUNCTION
parameter
4 bytes, 4-byte aligned
struct of 1-bit
fields
(See Note 14) set
Pascal files may be
read by C programs
with some effort. (See
Note 15)
file external record oriented file
pointer to void
function
procedure
pointer to
function
function
Table 3-1. HP C versus HP Pascal Storage Allocation
HP C Type HP C Description Correspondin
g HP Pascal
Type
HP Pascal Description