forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is Shutdown a reserved common block name?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Thu Aug 16, 2018 4:36 pm    Post subject: Is Shutdown a reserved common block name? Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Thu Aug 16, 2018 9:04 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Thu Aug 16, 2018 9:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Fri Aug 17, 2018 6:47 am    Post subject: Reply with quote

Maybe you should just change the name of the common block from "shutdown" to something more special.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Aug 17, 2018 6:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Fri Aug 17, 2018 7:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ryan



Joined: 25 Feb 2016
Posts: 110

PostPosted: Mon Aug 20, 2018 9:01 am    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Mon Aug 20, 2018 11:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group