HP 3000 Manuals

Variable Type [ HP FORTRAN 77/iX Programmer's Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Programmer's Guide

Variable Type 

The variable data types of FORTRAN 77 and their corresponding assignment
statements are shown in Table 1-1 .

          Table 1-1.  Data Type Keywords 

------------------------------------------------------------------
|                    |                |                          |
|    General Name    |   Data Type    |    Equivalent Keyword    |
|                    |    Keyword     |                          |
|                    |                |                          |
------------------------------------------------------------------
|                    |                |                          |
| Integer            | INTEGER*2 2    | INTEGER 1,3 (option)     |
|                    | INTEGER*4 2    | INTEGER 1,3 (default)    |
|                    |                |                          |
------------------------------------------------------------------
|                    |                |                          |
| Real               | REAL*4 2       | REAL 1                   |
|                    | REAL*8 2       | DOUBLE PRECISION 1       |
|                    | REAL*16 2      | (none)                   |
|                    |                |                          |
------------------------------------------------------------------
|                    |                |                          |
| Complex            | COMPLEX*8 2    | COMPLEX 1                |
|                    | COMPLEX*16 2   | DOUBLE COMPLEX 1         |
|                    |                |                          |
------------------------------------------------------------------
|                    |                |                          |
| Logical            | LOGICAL*1 2    | BYTE 2                   |
|                    | LOGICAL*2 2    | LOGICAL 1,3 (option)     |
|                    | LOGICAL*4 2    | LOGICAL 1,3 (default)    |
|                    |                |                          |
------------------------------------------------------------------
|                    |                |                          |
| Character          | CHARACTER 1    | (none)                   |
|                    |                |                          |
------------------------------------------------------------------

Notes 

1.  ANSI 77 standard.

2.  Extension to the ANSI standard.

3.  The equivalence depends on the setting of the compiler directives
LONG and SHORT.

The size of each data type determines how much storage is allocated to
the variable.  In addition to the size, the alignment requirement of each
type determines where the variable begins in storage.  For example, a
variable of CHARACTER*7 is allocated seven bytes of storage, starting on
a byte boundary.  Similarly, INTEGER*2 allocates two bytes of storage,
starting on a four byte boundary.  The size of each data type is the same
on different systems, but the alignment requirement is usually system
dependent.  Refer to the HP FORTRAN 77/iX Reference for more details on
the format and alignment for each data type.



MPE/iX 5.0 Documentation