Is the "implicit none" in the proper place in the following code ?
module aaa_modulesIMPLICIT NONE
implicit none
INTERFACE
SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE)
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
Is the "implicit none" in the proper place in the following code ?
No.
[snip]
You want
module aaa_modulesIMPLICIT NONE
implicit none
INTERFACE
SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE)
...
because declarations in the outer module have no meaning on
interfaces.
A rather frequent source of confusion, I'm afraid (I got bitten
by this myself in the past).
On 12/4/2024 2:11 PM, Thomas Koenig wrote:
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
Is the "implicit none" in the proper place in the following code ?
No.
[snip]
You want
-a-a-a-a-a-a module aaa_modules
-a-a-a-a-a-a-a-a-a-a-a implicit none
-a-a-a-a-a-a-a-a-a-a-a INTERFACE
-a-a-a-a-a-a-a-a-a-a-a-a-a SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE) >> -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a IMPLICIT NONE
...
because declarations in the outer module have no meaning on
interfaces.
A rather frequent source of confusion, I'm afraid (I got bitten
by this myself in the past).
Woof !-a I was afraid of that.-a The Fortran Module definition seems to be very fragile.
That is going to be painful to add to my module file.
Lynn
I think the design is correct in requiring the implicit none to be
repeated.
On Wed, 4 Dec 2024 18:40:08 -0600, Gary Scott wrote:
I think the design is correct in requiring the implicit none to be
repeated.
The sooner that implicit rCLIMPLICIT NONErCY is added to the standard, the better, I think.
In the meantime, gfortran (which is all anybody seems to be using anyway)
has rCL-fimplicit-nonerCY ...
On Wed, 4 Dec 2024 18:40:08 -0600, Gary Scott wrote:
I think the design is correct in requiring the implicit none to be
repeated.
The sooner that implicit rCLIMPLICIT NONErCY is added to the standard, the better, I think.
In the meantime, gfortran (which is all anybody seems to be using anyway)
has rCL-fimplicit-nonerCY ...
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
Is the "implicit none" in the proper place in the following code ?
No.
You want
module aaa_modulesIMPLICIT NONE
implicit none
INTERFACE
SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE)
...
because declarations in the outer module have no meaning on
interfaces.
On Wed, 4 Dec 2024 18:40:08 -0600, Gary Scott wrote:
I think the design is correct in requiring the implicit none to be
repeated.
The sooner that implicit rCLIMPLICIT NONErCY is added to the standard, the better, I think.
On Thu, 05 Dec 2024 01:45:28 +0000, Lawrence D'Oliveiro wrote:
On Wed, 4 Dec 2024 18:40:08 -0600, Gary Scott wrote:
I think the design is correct in requiring the implicit none to be
repeated.
The sooner that implicit rCLIMPLICIT NONErCY is added to the standard, the >> better, I think.
IMPLICIT NONE is a part of the Fortran standard.
On 12/4/2024 3:20 PM, Lynn McGuire wrote:
On 12/4/2024 2:11 PM, Thomas Koenig wrote:The interface is its own entity.-a I think the design is correct in requiring the implicit none to be repeated.-a While I might have
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
Is the "implicit none" in the proper place in the following code ?
No.
[snip]
You want
-a-a-a-a-a-a module aaa_modules
-a-a-a-a-a-a-a-a-a-a-a implicit none
-a-a-a-a-a-a-a-a-a-a-a INTERFACE
-a-a-a-a-a-a-a-a-a-a-a-a-a SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE) >>> -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a IMPLICIT NONE
...
because declarations in the outer module have no meaning on
interfaces.
A rather frequent source of confusion, I'm afraid (I got bitten
by this myself in the past).
Woof !-a I was afraid of that.-a The Fortran Module definition seems to
be very fragile.
That is going to be painful to add to my module file.
Lynn
preferred a "file scope" design more, as long as there is consistency in
the design, I'm ok with it.
Sorry for the direct email :( intended to post here
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 63 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492943:11:41 |
| Calls: | 840 |
| Files: | 1,300 |
| D/L today: |
5 files (1,241K bytes) |
| Messages: | 260,234 |