Re: How to address a global variable in a function

2009-08-13 Thread Aahz
In article <82c2f2e7-ed3e-482b-9318-d5539a2a9...@y10g2000prg.googlegroups.com>, n179911 wrote: > >I have a global variable > >// line 8 >tx = 0 > >and then I have this function (start in line 12): >def handleTranslate(result): > print line > txStr, tyStr = result.group(1), result.gro

Re: How to address a global variable in a function

2009-08-07 Thread n179911
On Aug 7, 8:29 pm, n179911 wrote: > HI, > > I have a global variable > > // line 8 > tx  = 0 > > and then I have this function (start in line 12): > def handleTranslate(result): >         print line >         txStr, tyStr = result.group(1), result.group(2) >         print txStr, tyStr > >        

Re: How to address a global variable in a function

2009-08-07 Thread Chris Rebert
On Fri, Aug 7, 2009 at 11:29 PM, n179911 wrote: > HI, > > I have a global variable > > // line 8 > tx  = 0 > > and then I have this function (start in line 12): > def handleTranslate(result): >        print line >        txStr, tyStr = result.group(1), result.group(2) >        print txStr, tyStr >

How to address a global variable in a function

2009-08-07 Thread n179911
HI, I have a global variable // line 8 tx = 0 and then I have this function (start in line 12): def handleTranslate(result): print line txStr, tyStr = result.group(1), result.group(2) print txStr, tyStr tx += int(txStr) ty += int(tyStr) return