View previous topic :: View next topic |
Author |
Message |
tates
Joined: 05 Nov 2007 Posts: 4 Location: Surrey University
|
Posted: Mon Sep 08, 2008 3:07 pm Post subject: RunTime zero divide error just hangs even with checkmate |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8217 Location: Salford, UK
|
Posted: Mon Sep 08, 2008 4:40 pm Post subject: |
|
|
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 |
|
 |
tates
Joined: 05 Nov 2007 Posts: 4 Location: Surrey University
|
Posted: Mon Sep 08, 2008 5:01 pm Post subject: |
|
|
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 |
|
 |
|