(j3.2006) Future deprecation of overriding character length, dimension and codimension

Bill Long longb
Fri Feb 24 14:57:42 EST 2017


On Feb 23, 2017, at 10:06 AM, Clune, Thomas L. (GSFC-6101) <thomas.l.clune at nasa.gov> wrote:

> Agreed.  Also, though perhaps I?m misunderstanding Malcolm?s intent, I think those are also useful when working with an automatic code generator.   It helps to avoid the 132 character limit if attributes are on separate lines and variable names get long:
> 
> REAL(kind=REAL32) :: <long-variable-name>
> DIMENSION :: <long-variable-name>(:,:,:)
> ALLOCATABLE :: <long-variable-name>
> 
> Though, I think the proper fix here is to allow lines to be much longer than 132 characters.   (I know, any upper limit will be too small, but O(1000) would solve most preprocessing/code-generation issues I?ve encountered.)

But certainly the simple fix for this problem is

REAL(kind=REAL32),DIMENSION(:,:,:),ALLOCATABLE :: &
   <long-variable-name>

or, maybe better,

REAL(kind=REAL32),ALLOCATABLE :: &
   <long-variable-name>(:,:,:)

Automatic code generators can certainly be trained to generate statement continuations. 


Cheers,
Bill


Bill Long                                                                       longb at cray.com
Fortran Technical Support  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101





More information about the J3 mailing list