RE: namespace coflicts: local vs private symbols

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

Hi again Lewis,


Lewis Townsend wrote:
> Hello Al,
> 
> sequence x
> x = {0,0,0,0}
> procedure p ()
> 	sequence x
> 	x = local:x + 1
> 	? x
> end procedure
> ? x
> p ()
> ? x
> 
> later
> Lewis Townsend
> 
> 

Ahhh! That clarifies the question a bit smile

But, as long as you dont mind renaming the local "x" to
"Local:x" (which doesnt seem like a bad idea really)
then you also wont mind the following solution:


sequence x
x = {0,0,0,0}

function Get_x()
  return x
end function

procedure p ()
sequence x
x = Get_x() + 1
? x
end procedure
? x
p ()
? x


Good luck with it,
Al

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

Search



Quick Links

User menu

Not signed in.

Misc Menu