SPL to HP C/XL Migration Guide (30231-90001)
4-2
SPL data declarations have only three general forms: simple, array, and
pointer. However, this simplicity is enhanced by the powerful ability
to
equivalence data of all types and formats and to develop elaborate
overlay structures.
It is necessary, therefore, to understand the physical relationships
between data elements. Much of that is beyond the scope of this guide.
However, it may be useful to you to construct a diagram of the DB-, Q-,
and S-relative data areas to determine the correct choice for converting
data declarations.
In many cases, you may be able to use HP C/XL pointers in simple
emulation of the SPL declarations. In other cases, the data
relationships may require an HP C/XL union declaration to ensure the
correct interplay of the variables.
In the following sections, the SPL and HP C/XL
type
syntax elements
refer
to the following simple variable types:
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
| INTEGER | short int |
| | |
---------------------------------------------------------------------------------------------
| | |
| DOUBLE | long int |
| | |
---------------------------------------------------------------------------------------------
| | |
| LOGICAL | unsigned short int |
| | |
---------------------------------------------------------------------------------------------
| | |
| BYTE | unsigned char OR unsigned short int |
| | |
---------------------------------------------------------------------------------------------
| | |
| REAL | float |
| | |
---------------------------------------------------------------------------------------------
| | |
| LONG | double |
| | |
---------------------------------------------------------------------------------------------
The rest of this chapter discusses global declarations. Local and
external declarations are discussed in Chapter 8.