Wow. Thought that was long gone. It has been long enough since I used it that my
memory might be tainted by time; but I remember that as the best debugging feature ever.
As mentioned in another thread, some Fortran compilers.
have a special DEBUG feature. For each program unit
(main program, subroutine, or function) before the END
statement, you can put a DEBUG statement.
Some options of the DEBUG statement itself allow for
subscript bounds checking for some or all arrays, tracing
of execution of numbered statements, and changes to the
values of some or all variables.
In addition, one can add debugging statements to be
executed at different parts of the program, with all the
statements placed in debug packets, just before the END
statement.
DEBUG
AT 10
DISPLAY X,Y,Z
END
will, just before executing statement 10 print (NAMELIST
like) the values of the indicated variables. You can put most
statements inside a debug packet, so even:
DEBUG
AT 10
GOTO 20
Even worse than a COME FROM statement, there is no sign
at either statement 10 or 20 about what it does.
More usual, you would do something like:
DEBUG
AT 10
TRACE ON
AT 20
TRACE OFF
END
so statement number tracing only happens between
those statements.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 159 |
Nodes: | 16 (0 / 16) |
Uptime: | 98:51:56 |
Calls: | 3,209 |
Files: | 10,563 |
Messages: | 3,009,783 |