Silverfrost Forums

Welcome to our forums

RunTime zero divide error just hangs even with checkmate

8 Sep 2008 2:07 #3806

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?

8 Sep 2008 3:40 #3807

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.

8 Sep 2008 4:01 #3808

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

Please login to reply.