HP3000_32 [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation
HP Pascal/iX Reference Manual
HP3000_32
HP3000_32 is a System-Dependent MPE/iX Option.
The HP3000_32 compiler option specifies that a given type in an HP3000_16
program is to be allocated and aligned according to the HP Pascal packing
algorithm.
Syntax
$HP3000_32$
Default HP3000_32 is the default when HP3000_16 is not used.
Location After the symbol = in a type definition.
If a program does not specify HP3000_16, then HP3000_32 has no effect,
and the compiler issues a warning.
A user-defined type that is within a structure declared with HP3000_32
must also be declared with HP3000_32.
A user-defined type that is within a structure declared without HP3000_32
must also be declared without HP3000_32.
HP3000_32 is illegal with these types:
* Boolean
* Char
* Integer
* Text
String, set, and real operations are illegal on HP3000_32 strings, sets,
and real numbers. HP3000_32 strings, sets, and real numbers are not
assignment compatible with HP3000_16 strings, sets, and real numbers.
Use the predefined procedures strconvert and setconvert and the intrinsic
HPFPconvert to convert HP3000_32 strings, sets, and real numbers to
HP3000_16 strings, sets, and real numbers.
Example
$HP3000_16$
PROGRAM show_packing_algorithms;
TYPE
t_pac = PACKED ARRAY [1..10] OF char;
s_pac = $HP3000_32$
PACKED ARRAY [1..10] OF char;
t_starray = ARRAY [1..5] OF string[10];
s_starray = $HP3000_32$
ARRAY [1..5] OF string[10];
t_rec = RECORD
f1 : -32768..32767; {16 bits allocated}
f2 : real; {HP 3000 real number}
f3 : string[10]; {16 bits allocated}
f4 : t_pac;
f5 : s_pac; {error}
f6 : t_starray;
f7 : s_starray; {error}
f8 : s_starray; {error}
END;
s_rec = $HP3000_32$ RECORD
f1 : -32768..32767; {32 bits allocated}
f2 : real; {IEEE real number}
f3 : string[10]; {32 bits allocated}
f4 : t_pac; {error}
f5 : s_pac;
f6 : t_starray; {error}
f7 : s_starray; {error}
END;
t_array = ARRAY [1..5] OF t_rec;
t_array1 = ARRAY [1..5] OF s_rec; {error}
s_array = $HP3000_32$
ARRAY [1..5] OF s_rec;
s_array1 = $HP3000_32$
ARRAY [1..5] OF t_rec; {error}
t_file = FILE OF t_rec;
t_file1 = FILE OF s_rec; {error}
s_file = $HP3000_32$
FILE OF s_rec;
s_file1 = $HP3000_32$
FILE OF t_rec; {error}
t_array2 = ARRAY [1..5] OF RECORD
f1 : -32768..32767; {16 bits allocated}
f2 : real; {HP 3000 real number}
f3 : string[10]; {16 bits allocated}
END;
s_array = $HP3000_32$
ARRAY [1..5] OF RECORD
f1 : -32768..32767; {32 bits allocated}
f2 : real; {IEEE real number}
f3 : string[10]; {32 bits allocated}
END;
VAR
v_file1 : t_file;
v_file2 : s_file;
v_file3 : FILE OF t_rec;
v_file4 : FILE OF s_rec; {error}
BEGIN
END.
MPE/iX 5.0 Documentation