VMS Help  —  FORTRAN  Statements  BLOCK_DATA
  Begins a block data program unit.  Statement format:

     BLOCK DATA [nam]
       [stmts]
     END [BLOCK DATA [nam]]

     nam   Is the symbolic name used to identify the block.

     stmts Is one or more of the following statements:

            COMMON        PARAMETER  Type declaration
            DATA          POINTER    Derived-type definition
            DIMENSION     RECORD     Record structure declaration
            EQUIVALENCE   SAVE
            IMPLICIT      TARGET
            INTRINSIC     USE

     Note: A type declaration cannot contain the ALLOCATABLE,
           EXTERNAL, INTENT, OPTIONAL, PRIVATE, or PUBLIC
           attributes.

  A BLOCK DATA statement and its associated specification statements
  are a special kind of program unit, called a block data subprogram.

  A block data program unit need not be named, but there can only be
  one unnamed block data program unit in an executable program.

  A block data subprogram must not contain any executable statements.

  As with other types of program units, the last statement in a block
  data subprogram must be an END statement.  If a name follows the
  END statement, it must be the same as the name specified in the
  BLOCK DATA statement.

  Within a block data subprogram, if a DATA statement initializes any
  entity in a named common block, the subprogram must have a complete
  set of specification statements that establishes the common block.
  However, all of the entities in the block do not have to be
  assigned initial values in a DATA statement.

  One block data subprogram can establish and define initial values
  for more than one common block.

  The name of a block data subprogram can appear in the EXTERNAL
  statement of a different program unit to force a search of object
  libraries for the BLOCK DATA program unit at link time.
Close Help