For loop variables reported incorrectly in ex.err file

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu