HP C Programmer's Guide (92434-90009)

Chapter 3 45
Calling Other Languages
Comparing HP C and HP Pascal
long enum 4 bytes, 4-byte aligned integer 4 bytes, 4-byte aligned, subrange:
-2,147,483,648..2,147,483,647
array [
n
]oftype Size is number of
elements times
element size. Align
according to element
type.
ARRAY [0 ..
n
-1]OFtype
(See Note 3)
Size is the number of elements
times element size. Align
according to element type.
array [
n
] of
char
[
n
] bytes, byte aligned PACKED
ARRAY [0 ..
n
-1] OF
CHAR or not
PACKED (See
Note 4)
[
n
] bytes, byte aligned
struct (See Note
5)
Pascal string
descriptors may be
emulated using C
structures,see the note
for an example.
STRING [
n
] Size 4+[
n
]+1 bytes, 4-byte aligned.
Pointer to string
descriptor
structure (See
Note 6)
Pascal VAR parameters
may be emulated using
C pointers to string
descriptor structures.
(See Note 6).
STRING
char * Pointer to a null
terminated array of
characters
pointer to
character
array
(See Note 7)
struct Size of elements plus
padding, aligned
according to largest
type
record (See Note 8)
union Size of elements plus
padding, aligned
according to largest
type
(untagged)
variant
record (See
Note 9)
(See Note 8)
signed bit-fields packed
record (See
Note 10)
unsigned
bit-fields
packed
record (See
Note 11)
Table 3-1. HP C versus HP Pascal Storage Allocation
HP C Type HP C Description Correspondin
g HP Pascal
Type
HP Pascal Description