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
module aaa_modules
implicit none
INTERFACE
SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE) >> 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 ! I was afraid of that. 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 “IMPLICIT NONE” is added to the standard, the better, I think.
In the meantime, gfortran (which is all anybody seems to be using anyway)
has “-fimplicit-none” ...
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 “IMPLICIT NONE” is added to the standard, the better, I think.
In the meantime, gfortran (which is all anybody seems to be using anyway)
has “-fimplicit-none” ...
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 “IMPLICIT NONE” 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 “IMPLICIT NONE” 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. I think the design is correct in requiring the implicit none to be repeated. 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
module aaa_modules
implicit none
INTERFACE
SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE) >>> 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 ! I was afraid of that. 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: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,007 |
Nodes: | 10 (0 / 10) |
Uptime: | 62:53:50 |
Calls: | 13,153 |
Calls today: | 3 |
Files: | 186,574 |
D/L today: |
1,833 files (813M bytes) |
Messages: | 3,313,020 |