[Info-vax] Fortran Debug Step odd behavior on continuation lines
Tom Wade
nospam at void.blackhole.mx
Sat Aug 29 11:07:08 EDT 2020
Hi,
I've noticed the following odd behavior when single stepping through a
Fortran program with continuation lines. I've always worked around it,
as it never caused me any real problems, but I finally had the time to
put it down, so that someone might explain what I've been doing wrong
all these years.
Consider the following trivial program, compiled /debug/noopt and
launched with screen mode debugging.
─ SRC: module TEST
-scroll-source───────────────────────────────────────────────
-> 1: Program Test
2:
3: Implicit None
4: Integer i, j
5:
6: i = 0
7: j = 0
8: i = i +
9: & j +
10: & 5
11: Call Exit
12: End
If you STEP (or hit KP0), the Debugger steps through the program line by
line. First step goes to line 6, second to line 7 etc until it gets to
8. At 8, I would expect the Debugger to step to 11, as 9 & 10 are
continuation lines, effectively part of the same statement. Instead it
steps to 9. The really strange thing is the next step jumps back to 8.
The one after that goes to 9, the next one back to 8 again, and the next
one goes to 11 (skipping 9 & 10). The value of i only changes when it
arrives at 11.
Not a real problem, but I guess finally my curiosity got the better of
me. Anyone else seen or can understand this ?
OpenVMS Alpha 8.4
HP Fortran V8.2-104679
HP Fortran 77 V7.6-198 (/old_f77)
(but it's been around for as long as I remember, and that's quite a
while!).
Tom Wade
tom dot wade at tomwade got eu
More information about the Info-vax
mailing list