[Tutor] Referencing global variables

Sean 'Shaleh' Perry shalehperry@attbi.com
Wed, 4 Sep 2002 14:02:21 -0700


On Wednesday 04 September 2002 13:51, Jeff Shannon wrote:
> The simple solution, as Sean pointed out, is to declare that 'count'
> is a global before you use it in the function.  This will get exactly
> the behavior you're expecting.  The not-so-simple solution would be to
> find some other way of counting whatever it is that you're counting,
> but doing that would require more knowledge of what you're trying to
> do.  ;)  In particular, I wonder why you're not using this:
>

I made the assumption that the example was simply meant to illustrate his=
=20
point and was not really his code.  I hope I was right (-: