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

Carl, I think this type of refactoring is not currently available in Photran. I could of course be wrong, but the automatic refactoring actions are available under the Refactoring menu and currently this is what I see in the Common sub-menu:
Inline image 1

Are you going about doing the refactoring in a different manner and seeing an error with the output produced? Or are you mainly asking how to have the Photran code do this type of refactoring? or ...

Thanks,
Louis


Date: Thu, 11 Apr 2013 12:26:43 -0700
From: Walt Brainerd <walt.brainerd@xxxxxxxxx>
To: Carl Slater <ce.slater@xxxxxxxxx>,  Photran Information
        <photran@xxxxxxxxxxx>
Subject: Re: [photran] Refactoring F77 global common blocks into F90
        modules
Message-ID:
        <CAPsJ1Naj-8SHpxQv-m=Z5f_CzpdxRMjnHVncFr40Wfy5-ojKqw@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/photran/attachments/20130411/d8700351/attachment.html>

------------------------------


Back to the top