Silverfrost Forums

Welcome to our forums

UNDEF

4 May 2018 4:01 #22072

RUNNING SILVERFROST FORTRAN, WHEN INTERUPPTED IN PAST, GOT LINE NUMBER IN THE FORTAN PROGRAM WHERE THE INTERRUPT OCCURED. NOW GETTING 'REFERENCE TO UNDEFINED VARIABLE, ARRAY, ELEMENT OR FUNCTION 00422000 MAIN#(+C765)', PROBABLY HAVE A PROJECT ELEMENT TURNED ON OR OFF BUT NOT SURE. ANY HELP WOULD BE APPRECIATED. THANKS, SID KRAFT

4 May 2018 5:36 #22073

Sid

If you have /checkmate switch on then you should also get the line number where the failure occured. Anyway, if you run your program via the debugger then it will fail at the line where the 'undef' error occurs.

6 May 2018 7:31 #22093

Paul: Have following set checkmate on, compiler options: -output profile info -debug info -checking code -check undefined variable -full checking code -full debug information -array bounds checking

Getting line numbers listed in compiler output. Yet, still get the error stated and not a line number when interrupt??? Not sure why I am not getting, any ideas? Sid Kraft

6 May 2018 8:00 #22094

Sid

Are you using the debugger to step through your code?

6 May 2018 8:27 #22095

Paul: Good call, I had checkmate denoted before I started rather than debug, works fine now, Thanks, Sid

6 May 2018 10:12 #22096

Sid

I think that you have missed the point. If your program runs with /debug and not with /undef then there is one or more errors in your code. Variables are being used before they have been given a value.

You should use /undef (or /checkmate which is roughly the same) and step through the code by using the debugger called SDBG until an error is reported. This will tell you which variables need to be given a value before they are used.

SDBG can be started from Plato or by runing SDBG.exe from a command line or directly from Windows Explorer.

Please login to reply.