Re: problems with the scoping in eu4

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

I think his point about reusing for-loop variables is that you cannot have a normal variable with the same name as the for-loop variable. It's related to the masking issue we've been discussing.

integer idx = 0 
for idx = 1 to 10 do -- error! 
   ? idx 
end for 

Maybe kind of silly, but I think it and the block scope variable masking has a lot to do with all the namespace issues the dev team has been trying to fix/make sane since the beginning.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu