Re: scope of variables

new topic     » goto parent     » topic index » view thread      » older message » newer message
coconut said...
namespace test 
 
integer i=1 
procedure test1() 
   integer i=2 
   ? test:i 
   ? i  
end procedure 
test1() 

You see Jeremy there is no problem reusing same name as at top level in a function smile
It is better leave it as it is now.

Yes. Namespaces are nice, but that doesn't make it right. It also does not solve the discussed problem of:

integer abc = 10 
if abc > 5 then 
    sequence abc = "John" 
    if equal(abc, "John") then 
        atom abc = 12.3 
        return abc * 5.8 
    end if 
end if 

Which is what is being proposed.

Jeremy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu