For loop variables reported incorrectly in ex.err file
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Feb 07, 2004
- 505 views
The following test program demonstrates the problem: procedure t(integer i) for j=i to i do if i=1 then ?9/0 end if t(i-1) end for end procedure t(3) It creates the following ex.err file, clearly duplicating the current value of j rather than showing the correct value from the calling scope: C:\test.exw:3 in procedure t() attempt to divide by 0 i = 1 j = 1 ... called from C:\test.exw:4 in procedure t() i = 2 j = 1 ... called from C:\test.exw:4 in procedure t() i = 3 j = 1 Regards, Pete