8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table 8-1Default Sizes and Alignments of Compatible Types (Pascal and FORTRAN)

 

 

 

 

 

 

 

Pascal Type

FORTRAN Type

Size (Bytes)

 

Alignment (Bytes)

 

 

 

 

 

 

 

 

 

double

double

precision

8

 

8

 

 

 

 

 

 

 

 

 

 

longreal

double

precision

8

 

8

 

 

 

 

 

 

 

 

 

 

real

double

precision

8

 

8

 

 

 

 

 

 

 

 

 

 

single

real

 

4

 

4

 

 

 

 

 

 

 

 

 

 

shortreal

real

 

4

 

4

 

 

 

 

 

 

 

 

 

integer16

integer*2

2

 

2

 

 

 

 

 

 

 

 

 

integer32

integer*4

4

 

4

 

 

 

 

 

 

 

 

 

integer

integer*4

4

 

4

 

 

 

 

 

 

 

 

-128..127

logical*1, byte, or

1

 

1

 

 

 

character

 

 

 

 

 

 

 

 

 

 

 

 

 

boolean

logical*1, byte, or

1

 

1

 

 

 

character

 

 

 

 

 

 

 

 

 

 

 

 

 

alfa

character*10

10

 

1

 

 

 

 

 

 

 

 

 

char

character

1

 

1

 

 

 

 

 

 

 

 

 

string

character*80

80

 

1

 

 

 

 

 

 

 

 

 

varying[n]

structure /v/

-

 

4

 

 

of char

integer*4

 

 

 

 

 

 

character*n

 

 

 

 

 

 

end structure

 

 

 

 

 

 

 

 

 

 

 

 

 

array

array

 

Same as element type

 

 

 

 

 

 

 

 

 

 

 

record

structure

 

-

 

4

 

 

 

 

 

 

 

 

 

Table 8-2 lists the default sizes and alignments of compatible types for

FORTRAN and Pascal with the -xloption:

Table 8-2Sizes and Alignments of Compatible Types (Pascal and FORTRAN) with –xl

Pascal Type

FORTRAN Type

Size (Bytes)

Alignment (Bytes)

 

 

 

 

real

real

4

4

 

 

 

 

integer

integer*2

2

2

 

 

 

 

Precautions with Compatible Types

This section describes the precautions you must take when working with character strings and array indexes.

The FORTRAN–Pascal Interface

165