HP 3000 Manuals

Changed Features [ HP Pascal/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Pascal/XL Migration Guide

Changed Features 

This section describes features to be aware of that have changed between
Pascal/V and HP Pascal/XL.

Word Length 

The "natural" word length in a Pascal/V program is 16 bits, whereas in a
HP Pascal/XL program it is 32 bits.

Data Alignment 

Alignment refers to the relative position at which a variable's share of
memory begins (i.e.  at a boundary that is a multiple of 'n' bytes, as
described below).  Pascal/V data is aligned on 1 or 2-byte boundaries,
whereas HP Pascal/XL data is aligned on 1, 2, 4, or 8-byte boundaries.

=       | ALIGNMENT      | BYTE BOUNDARY  |  
        | byte           |     1          |
        | half-word      |     2          |
        | word           |     4          |
        | double-word    |     8          |

For example, strings and sets in Pascal/V are aligned on 2-byte
boundaries.  In HP Pascal/XL, strings are aligned on 4-byte boundaries
and sets are aligned on 1, 2, or 4-byte boundaries.

For more information on data alignment, refer to the HP Pascal
Programmer's Guide.

Packing of Data 

Packing of data in HP Pascal/XL is done using the natural alignment of
components to determine the size and alignment of the structure.  Refer
to the HP Pascal Programmer's Guide for more information on packing.
Refer to the Pascal/3000 Reference Manual for information on packing of
Pascal/V data.


NOTE Packing is only of concern if the Pascal/V program depends on a particular layout.
User-Defined Subranges A user-defined subrange of -32768 to 32767 in Pascal/V is allocated 16 bits of storage, whereas in HP Pascal/XL it is allocated 32 bits. All user-defined integer subranges with negative lower bounds are allocated 32 bits for storage in HP Pascal/XL. If you need a 16-bit data type in HP Pascal/XL, define an integer subrange of 0..65535 (if only positive values are required), or use the predefined data type shortint for both negative and positive values. Floating-Point Format The floating-point format is represented differently on MPE XL systems than on MPE V systems. Floating point in HP Pascal/XL may not be able to represent the same values as Pascal/V because of the difference in IEEE representation. The MPE XL series 900 representation is called "IEEE floating-point format." The MPE V floating point format is available on MPE/XL software. The HP3000_16 compiler option is used to access MPE V floating point (see Chapter 3). SPLINTR Compiler Option The Pascal/V compiler option SPLINTR is called SYSINTR in HP Pascal/XL ("SPLINTR" is also recognized by the HP Pascal/XL compiler). Refer to the HP Pascal Programmer's Guide for more information on SYSINTR.
NOTE SPLINTR/SYSINTR files have a different format on MPE XL than on MPE V. Thus, they cannot be combined. The HP Pascal/XL compiler expects a SYSINTR file to be an MPE XL intrinsic file. In order for the compiler to access a SPLINTR file, the file must be recreated using the HP Pascal/XL option, BUILDINT. For more information on BUILDINT, refer to the HP Pascal Programmer's Guide.
Using Intrinsics When using an intrinsic, be sure to change any references to an intrinsic from "EXTERNAL" to "INTRINSIC."
NOTE Many of the existing intrinsic parameters have changed in MPE XL. Refer to the Intrinsics Reference Manual to see which parameters are required and what the optional parameters' defaults are.
Invoking the Compiler. The commands used to invoke the HP Pascal/XL compiler are different from those used to invoke the Pascal/V compiler. The differences are shown below: | Pascal/V | Pascal/XL | | pascal | pasxl | | pascalprep | pasxllnk | | pascalgo | pasxlgo |


MPE/iX 5.0 Documentation