- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Say I have the following code:
integer :: i, j, m, n, loc1
loc1=65
m=1
n=1
j=1
DO i=1,500
DO WHILE(j.lt.loc1)
...
j=j+1
m=m+1
IF(n.eq.1000)
m=0
END IF
n=n+1
END DO
j=0
END DO
The bug I'm encountering is this:
If I put a breakpoint on the line "DO WHILE (j.lt.loc1)" before 'Start Debugging' and I choose a breakpoint condition of m=1 is true, with each execution of the inner loop the debugger does not increment the variable m however the variable n increments by 1 as it should.
Has anyone else encountered this problem??
If I put m=5 before 'Start Debugging' then it will execute the inner loop properly until m=5 and n=5, then thereafter m will remain 5!
This doesn't make any sense to me...
integer :: i, j, m, n, loc1
loc1=65
m=1
n=1
j=1
DO i=1,500
DO WHILE(j.lt.loc1)
...
j=j+1
m=m+1
IF(n.eq.1000)
m=0
END IF
n=n+1
END DO
j=0
END DO
The bug I'm encountering is this:
If I put a breakpoint on the line "DO WHILE (j.lt.loc1)" before 'Start Debugging' and I choose a breakpoint condition of m=1 is true, with each execution of the inner loop the debugger does not increment the variable m however the variable n increments by 1 as it should.
Has anyone else encountered this problem??
If I put m=5 before 'Start Debugging' then it will execute the inner loop properly until m=5 and n=5, then thereafter m will remain 5!
This doesn't make any sense to me...
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another thing I've noticed that can happen when debugging DO loops is if
I choose the DO variable counter as the breakpoint condition (e.g.
i=30), then when the breakpoint is reached, the counter variable gets
reset to 1!
Since no one has replied to this thread I guess I am the only person who has this problem???
Since no one has replied to this thread I guess I am the only person who has this problem???
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page