Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] Refactoring F77 global common blocks into F90 modules

I wouldn't expect a refactoring to produce that exactly:

1. KIND=4 is not quite portable.

2. Why not

      integer, public :: NVARY = -1

???

But yes, conversions of this type should be pretty common (oops).


On Thu, Apr 11, 2013 at 3:26 AM, Carl Slater <ce.slater@xxxxxxxxx> wrote:
So I want to convert:
 
COMMON/NC1/ NVARY , STALM , NSHRD , MAT , EFPOLT , NPAGE , MINI
 
into something that looks like:
 
 
Module NC1   
    implicit none
    INTEGER     (KIND=4),   PUBLIC :: NVARY
    REAL        (KIND=4),   PUBLIC :: STALM
    INTEGER     (KIND=4),   PUBLIC :: NSHRD
    INTEGER     (KIND=4),   PUBLIC :: MAT
    REAL        (KIND=4),   PUBLIC :: EFPOLT
    INTEGER     (KIND=4),   PUBLIC :: NPAGE
    INTEGER     (KIND=4),   PUBLIC :: MINI
    data NVARY/-1/
    data STALM/1/
    data NSHRD/-1/
    data MAT/-1/
    data EFPOLT/1/
    data NPAGE/-1/
    data MINI/-1/
END Module NCI
 
My guess is this is a fairly common refactor..... so the question is how?
 
Regards
Carl



_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/photran




--
Walt Brainerd

Back to the top