View previous topic :: View next topic |
Author |
Message |
stfark1
Joined: 02 Sep 2008 Posts: 210
|
Posted: Fri May 04, 2018 5:01 pm Post subject: UNDEF |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri May 04, 2018 6:36 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
stfark1
Joined: 02 Sep 2008 Posts: 210
|
Posted: Sun May 06, 2018 8:31 pm Post subject: Fortran Line Pointer |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Sun May 06, 2018 9:00 pm Post subject: |
|
|
Sid
Are you using the debugger to step through your code? |
|
Back to top |
|
|
stfark1
Joined: 02 Sep 2008 Posts: 210
|
Posted: Sun May 06, 2018 9:27 pm Post subject: |
|
|
Paul: Good call, I had checkmate denoted before I started rather than debug, works fine now, Thanks, Sid |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Sun May 06, 2018 11:12 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
|