(j3.2006) POINTER initializations in BLOCK DATA

Bill Long longb
Wed Apr 29 19:14:14 EDT 2009



Robert Corbett wrote:
> Why does the standard prohibit variables whose types are nonsequence
> non-BIND(C) derived types from appearing in common blocks?
>
>   
Common blocks are only interesting if they appear in more than one 
program unit.  Assume a minimal set of two,  and the common block has 
just one variable of a derived type that is not BIND(C) and not a 
sequence type. The type definition would need to be available in both 
program units.  If separate type definitions appear in the two program 
units, they would be specifying different types.  The alternative is 
pathological: put the type definition in a module and then put the 
associated data in a common block instead of in the module.  At come 
point, you need to just say no to common.  This seem like a reasonable 
place to draw the line.

Cheers,
Bill

-- 
Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            




More information about the J3 mailing list