replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - RunTime zero divide error just hangs even with checkmate
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 

RunTime zero divide error just hangs even with checkmate

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



Joined: 05 Nov 2007
Posts: 4
Location: Surrey University

PostPosted: Mon Sep 08, 2008 3:07 pm    Post subject: RunTime zero divide error just hangs even with checkmate Reply with quote

Hi,
Just installed FTN95 v4.9.1 and Plato 3 on a new machine for simple teaching of Fortran.

My problem is trapping runtime errors - I have a little program zero.f95 that incurs a zero divide at runtime using

REAL X,Y
X = 0.0
Y = 1.0 / X

If I run at the command prompt FTN95 zero.f95 /check /lgo
the zero divide is trapped and up pops the Plato debugging window.

If I try running from within Plato even after setting /check in the Tools:Command Line Options and selecting CheckMate win32 for the configuration - the running program just hangs in the command window until I press Ctrl+C.

What I am doing wrong ? Previously I have used other PCs that under these circumstances pop up a nice little runtime error box saying 'zero divide at line nnnnn '

Help apreciated to get the settings right on this new install.

Andy.
P.S. Just changed the code to use INTEGER and Integer constants and it traps it as I had expected. Is there some settings I need to alter for real arithmetic?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Sep 08, 2008 4:40 pm    Post subject: Reply with quote

When running from a command line you should end up in SDBG (the FTN95 debugger) with an indicator to the error and line at which the failure occured. If you cannot see the SDBG display then look on the Taskbar and, if necessary, maximise the window.

It is better to use the latest release of FTN9 because there was a problem with the displaying of runtime error messages but this should not be a problem when using /check and /lgo.
Back to top
View user's profile Send private message AIM Address
tates



Joined: 05 Nov 2007
Posts: 4
Location: Surrey University

PostPosted: Mon Sep 08, 2008 5:01 pm    Post subject: Reply with quote

Thanks for the reply - probably ended up in the Plato one as I had that open at the time because I only went back to good old command line version when I got unexpected results from Plato. (Been using Salford FTN since the old 386 days you see)

Will have to get our University to get the latest updates under its license - unless I can download them online and use our existing details? Please PM me if that is possible.

Andy Tate
University of Surrey
Guildford. a.tate@surrey.ac.uk
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