F2023:C8107 states
The namelist-group-name shall not be a name accessed by use association.
Are following pieces of code standard conforming?
! Code 1
module mod_nml1
implicit none
logical :: ldiag
namelist /nam_nml1/ldiag
end module mod_nml1
program ice_nml
use mod_nml1
implicit none
integer :: ilu
ldiag = .false.
write(*,nml=nam_nml1) ! <-- Use assoc. of namelist-group-name
end program ice_nml
! Code 2
module mod_nml1
implicit none
logical :: ldiag
namelist /nam_nml1/ldiag
end module mod_nml1
program ice_nml
use mod_nml1
implicit none
integer :: ilu, j
namelist /nam_nml1/j ! <-- Use assoc of namelist-group-name
ldiag = .false.
j = 42
write(*,nml=nam_nml1) ! <-- Use assoc of namelist-group-name
end program ice_nml
Clarification of the interpretation of C8107 would be appreciated?
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,090 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 157:50:50 |
| Calls: | 13,922 |
| Files: | 187,021 |
| D/L today: |
124 files (31,986K bytes) |
| Messages: | 2,457,265 |