replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Debugging subroutines and include files
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 

Debugging subroutines and include files

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



Joined: 23 Dec 2010
Posts: 8

PostPosted: Tue Jan 04, 2011 8:06 am    Post subject: Debugging subroutines and include files Reply with quote

I am sure this is a very basic question but I cannot find any instruction on how to do it. When I run debug using Plato,
the CALL statements it seemed cannot be used as break points. I cannot find how to 'step' into the subroutines. The subroutines are in include files.

I would appreciate all help and pointers. Thank you.
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Tue Jan 04, 2011 8:41 am    Post subject: Reply with quote

I had a similar problem recently. I assume that if it is a "real" subroutine you should add it as a source file. The include statement is good e.g. common blocks and stuf like that.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Jan 04, 2011 9:29 am    Post subject: Reply with quote

If you want to step into a subroutine then it must have been compiled using one of the debugging switches on the FTN95 command line, e.g. /DEBUG, /CHECK, /CHECKMATE etc.

DEBUG and CHECKMATE are standard options in Plato and the FTN95 Visual Studio plugin.
Back to top
View user's profile Send private message AIM Address
maxifrost



Joined: 23 Dec 2010
Posts: 8

PostPosted: Tue Jan 04, 2011 10:53 am    Post subject: Reply with quote

Yes, I did compile the files separately and in one project using the debug option. When I used 'step', it went to the call line and stayed there. Then I used step again and it went to the end of the main programme and stayed there. The 'step' command did not come up again until the programme gave a division by 0 statement and stopped. The include file statements are placed after the main programme.

I guess I should do what jjgermis is suggesting ( I think) i.e. to recombine it all into one file and debug it. Is there an easier way?
Back to top
View user's profile Send private message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Tue Jan 04, 2011 11:16 am    Post subject: Reply with quote

There are two sorts of "step": "step into" and "step over". You need to be stepping "into".
Back to top
View user's profile Send private message Send e-mail
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Tue Jan 04, 2011 12:12 pm    Post subject: Reply with quote

I tried the code below (thinking that is what you meant). This does not work no matter what compiler option you use (I use Plato as well). Instead of include 'ins.for' (or whatever the filename) does not work. In Plato you have to:
1.) right click on source files and
2.) insert ins.for as an (existing) source file.

At least this works fine on my system. Somehow Plato does not recognise include files automatically as source files.

Code:
      program step
      implicit none

      write(*,*) 'in the main program'
      write(*,*) 'going to call subroutine now'
      call sub
      write(*,*) 'returned from sub'
      end

      include 'ins.for'
Back to top
View user's profile Send private message
maxifrost



Joined: 23 Dec 2010
Posts: 8

PostPosted: Tue Jan 04, 2011 5:23 pm    Post subject: Reply with quote

Yes, that's what I have. OK will try your method. Thank you.
Back to top
View user's profile Send private message
maxifrost



Joined: 23 Dec 2010
Posts: 8

PostPosted: Tue Jan 04, 2011 5:25 pm    Post subject: Re: Reply with quote

sparge wrote:
There are two sorts of "step": "step into" and "step over". You need to be stepping "into".



Quite sure I did'nt see step into or I would have used it. I'll check it again. Thank you.
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 -> Support 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