MODULE DemoModule
CHARACTER*32, EXTERNAL :: NAME
END MODULE DemoModule
Compilation of this module provides a warning: WARNING - 197: Variable NAME has been declared but not used
Welcome to our forums
MODULE DemoModule
CHARACTER*32, EXTERNAL :: NAME
END MODULE DemoModule
Compilation of this module provides a warning: WARNING - 197: Variable NAME has been declared but not used
Are you sure that this is incorrect? It seems right to me. My understanding is that EXTERNAL means that NAME is a function that is defined elsewhere so there is no point in declaring it unless it is used.
MODULE DemoA
CHARACTER*32, EXTERNAL :: NameA
CHARACTER*8 DD
INTEGER NN
CONTAINS
SUBROUTINE Anton ()
CHARACTER*32 cResult
cResult = NameA ('4711')
cResult = cResult ! Dummy
END SUBROUTINE Anton
END MODULE DemoA
MODULE DemoB
CHARACTER*32 NameB
EXTERNAL NameB
END MODULE DemoB
MODULE DemoC
EXTERNAL NameC
END MODULE DemoC
I cannot see any reason why an EXTERNAL has to be used inside the MODULE. The variables DD and NN are not used as well. From my understanding a module can be used as well just for declaration without any use. MODULE DemoB does not produce a warning; MODULE DemoC does.
OK. I have made a note that this needs investigating.
This has now been fixed for the next release.