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 

Back checking in Plato

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



Joined: 19 Mar 2008
Posts: 29

PostPosted: Mon Jun 08, 2020 7:40 pm    Post subject: Back checking in Plato Reply with quote

When using Plato in debug mode, my program fails after 8400 iterations due to a variable suddenly becoming UNDEFined. It gives me the subroutine and line number of the failure. Is there any way to back track through the code in debug mode to find where this variable is being "UNDEFINED?" Thanks. E.J.
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Tue Jun 09, 2020 3:48 am    Post subject: Reply with quote

It depends. There is no provision in the debugger for running a program in reverse, and an apparently "undefined" variable need not even be truly undefined. Here is a short program to illustrate:

Code:
program undef
implicit none
integer i, j, k
j = Z'80608080'
k = Z'00100000'
do i=1, 5
   j = j + k
   print '(1x,I2,2x,Z8)',i,j
end do
end program


If you compile with just /debug and run the program from the command line, it will run normally. Inside the debugger, however, if you place a breakpoint on the line with "print", during the second execution of the loop body you will see j as "undefined" in the variables panel.

In your program, is the variable in question a local variable, a dummy argument or a module member? What is its type? Can you share the code with us?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Jun 09, 2020 8:01 am    Post subject: Reply with quote

AKS

Can you confirm that you are using an FTN95 command line option such as /UNDEF or /CHECKMATE.
Back to top
View user's profile Send private message AIM Address
AKS



Joined: 19 Mar 2008
Posts: 29

PostPosted: Tue Jun 09, 2020 8:37 pm    Post subject: UNDEF in Debug with Plato Reply with quote

When running Plato there is a Pulldown Window on the toolbar at the top which has Checkmate Win32 displayed in it. I don't know if that answers your question. Since yesterday I've removed some UNDEF errors by giving certain variables initial values. I'm at a point of failure where the UNDEF variable really is undefined. I will try to fix this and write again when I get another UNDEF error. I don't think that I can supply much of the source code. I cannot run from the Command window because the failures stop an executable from being made. Thank you for your kind help.
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Jun 10, 2020 1:33 am    Post subject: Re: UNDEF in Debug with Plato Reply with quote

AKS wrote:
I cannot run from the Command window because the failures stop an executable from being made.


The presence of undefined variables may be detected at
    1. compile time, in which case (depending on the compiler options in use) no OBJ and EXE may be produced, or

    2. run time, which can occur only if no compile-time undefined variables are present.

As long as the same compiler options are used, there is no difference between EXEs produced from an IDE or the command line. If "no executable can be made" is true, there can be no running of the non-existent EXE in Plato or the debugger.
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 -> Plato 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