Re: problems with the scoping in eu4

new topic     » goto parent     » topic index » view thread      » older message » newer message
jaygade said...

I think that the complaint is persistence from iteration to iteration. The variable is either unassigned, or it is reassigned some default value on every new iteration of the loop.

The simple example initially given was a good one, trying to use two counters in one loop.

If persistence from iteration to iteration is allowed, you'd need to do this:

while 1 do 
	integer i 
	if not object(i) then 
		i = 0 
	end if 
	 
	i += 1 
end while 

Which may not be a bad thing.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu