replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Confusing diagnostics in module
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 

Confusing diagnostics in module

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2879
Location: South Pole, Antarctica

PostPosted: Wed Jul 08, 2015 7:19 am    Post subject: Confusing diagnostics in module Reply with quote

Compile this program which has wrong line marked with the arrow
Code:
module Mo

CONTAINS

integer function f()
f=1
end function

subroutine abracadabra ! <--- wrong line

end module
!--------------------------
Program Pro
  use Mo
  Print*,' Nothing to print'
End program


The diagnostics is pretty confusing in this case because points at the wrong line as if something wrong is with integer function F or this function does not have END statement

Code:
    PROCESSING MODULE  [<MO> FTN95/Win32 v7.10.0]
0004) integer function f()
*** INTEGER cannot be declared inside SUBROUTINE block (perhaps missing
    CONTAINS or END statement?)


If you change this wrong line with something else like
CALL abracadabra

or

abracadabra

the diagnostics is correct and points at the exact offending place.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2879
Location: South Pole, Antarctica

PostPosted: Wed Jul 08, 2015 8:56 am    Post subject: Reply with quote

The point is different, John. It is about better diagnostics of dumb errors by the compiler
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jul 08, 2015 10:55 am    Post subject: Reply with quote

I have logged this for investigation.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions 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