View previous topic :: View next topic |
Author |
Message |
Ryan
Joined: 25 Feb 2016 Posts: 110
|
Posted: Thu Aug 16, 2018 4:36 pm Post subject: Is Shutdown a reserved common block name? |
|
|
Is the name 'Shutdown' reserved for a standard ClearWin+ common block?
I have some code that declares it, on turning up the heat (compiler warnings etc.) I get the following error but have no other references to it.
3809) common /shutdown/ iwin
*** COMMON block /SHUTDOWN/ is already in use as another global entity
If so, it seems implicitly declared so I can just delete it. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7930 Location: Salford, UK
|
Posted: Thu Aug 16, 2018 9:04 pm Post subject: |
|
|
Ryan
It looks like you have something else with the name "shutdown". Some other named entity (not a COMMON BLOCK). If the message appears as a warning then it may be OK to ignore it. I would need the details to say more. |
|
Back to top |
|
|
Ryan
Joined: 25 Feb 2016 Posts: 110
|
Posted: Thu Aug 16, 2018 9:06 pm Post subject: |
|
|
I could have missed it, but a global search does not reveal anything else named the same. I'll put it aside for now. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7930 Location: Salford, UK
|
Posted: Fri Aug 17, 2018 6:47 am Post subject: |
|
|
Maybe you should just change the name of the common block from "shutdown" to something more special. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Fri Aug 17, 2018 6:54 pm Post subject: |
|
|
I've tried a program with a 'shutdown' common block name and it works for me.
Have you checked all the include files and/or externally compiled modules? Is it a name of a resource, like an icon that is in a .RC file?
It might be worth doing a compilation with /XREF.
Eddie |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1887
|
Posted: Fri Aug 17, 2018 7:19 pm Post subject: |
|
|
The symbol SHUTDOWN is the name of a routine whose interface is declared in WIN32API.INS. If you include this file in your source code, or use a module that contains an interface to the routine, you cannot use SHUTDOWN as the name of a common block in the same program unit.
Here is an example code that gives the same compile time error message as in the original post.
Code: | program tsh
implicit none
include 'win32api.ins'
integer ixy
common /shutdown/ixy
!
ixy = 3
print *,ixy
end program |
Attempting to compile this gives
Code: | s:\FTN95>ftn95 sd.f90 /check
[FTN95/Win32 Ver. 8.30.279 Copyright (c) Silverfrost Ltd 1993-2018]
0005) common /shutdown/ixy
*** COMMON block /SHUTDOWN/ is already in use as another global entity
1 ERROR [<TSH> FTN95 v8.30.279]
*** Compilation failed |
|
|
Back to top |
|
|
Ryan
Joined: 25 Feb 2016 Posts: 110
|
Posted: Mon Aug 20, 2018 9:01 am Post subject: |
|
|
Apologies, I had notifications turned off so didn't see these responses.
I'd just come to the same answer and found it in win32api. What slowed me down was the error message about it being in use for another common block.
Thank you for your help. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1887
|
Posted: Mon Aug 20, 2018 11:51 am Post subject: |
|
|
Common block names are global entities, but there are other types of global entities as well.
Perhaps, if the error message said, "the name of the COMMON block /SHUTDOWN/ is already in use as another global entity", instead of the present "COMMON block /SHUTDOWN/ is already in use as another global entity", there would be less scope for confusion. |
|
Back to top |
|
|
|