The BLOCK DATA statement begins a block data program unit. The block data program unit initializes data that appears in named common blocks.
Syntax
BLOCK DATA [block-data-name]Where:
block-data-name is an optional name given to the block data program unit.
There can only be one unnamed BLOCK DATA program unit in a program.
A block data program unit may only initialize variables that appear in a named common block.
The same named common block may not appear in more than one block data subprogram.
A block data subprogram may only contain type declaration statements; the attribute specifiers PARAMETER, DIMENSION, POINTER, SAVE and TARGET; the specification statements USE, IMPLICIT, COMMON, DATA, EQUIVALENCE and INTRINSIC.
A type declaration statement in a block data subprogram may not specify the attributes ALLOCATABLE, EXTERNAL, INTENT, OPTIONAL, PRIVATE or PUBLIC.
Example
block data mydata common /d/ a,b,c data a,b,c /1.0,2.0,3.0/ end block data mydata