Intel fortran-80 manual BLOCK DATA Statement

Models: fortran-80

1 130
Download 130 pages 742 b
Page 40
Image 40
3.4.4 BLOCK DATA Statement

Defining Variables, Arrays, And Memory

FORTRAN-SO

3.4.4 BLOCK DATA Statement

The format of the BLOCK DATA statement is:

BLOCK DATA [name]

where 'name' is the symbolic name of the BLOCK DATA subprogram.

Since 'name' is global, it must not be the same as the name of an external procedure, main program, common block, or another BLOCK DATA subprogram. Only one unnamed BLOCK DATA subprogram is permitted per executable program.

J

Only an item in a common block may appear in a DIMENSION, EQUIVALENCE, or type statement in a BLOCK DATA subprogram. Only an item in a named com- mon BLOCK can be initialized in a BLOCK DATA subprogram.

If a named common block is initialized, all items in the block must be listed, even if they are not all initialized. More than one named common block may have items in- itialized in a single block data subprogram, but the same named common block may not be specified in more than one block data subprogram.

Examples:

BLOCK DATA BLK1

LOGICAL FLAGS(3)

INTEGER ZEROS(10),RESULTS

COMMON /BLOCK1/ FLAGS,ZEROS,RESULT DATA FLAGS/.TRUE., .TRUE., .FALSE.!

&ZEROS/1 0* 0/

END

3-14

Page 40
Image 40
Intel fortran-80 manual BLOCK DATA Statement